2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 14:25:41 +00:00

- Memory leak in the load_balance_mine() function is fixed. This would

leak ~20-30 octets per DHCPDISCOVER packet while failover was in use
  and in normal state. [ISC-Bugs #19548]

- Various compilation fixes have been included for the memory related
  DEBUG #defines in includes/site.h.  [ISC-Bugs #19548]
This commit is contained in:
David Hankins
2009-04-07 19:55:52 +00:00
parent e6b3a14046
commit 95fd7038a2
8 changed files with 49 additions and 20 deletions

View File

@@ -255,8 +255,9 @@ void dmalloc_dump_outstanding ()
{
static unsigned long dmalloc_cutoff_point;
struct dmalloc_preamble *dp;
#if defined(DEBUG_MALLOC_POOL)
unsigned char *foo;
int i;
#endif
if (!dmalloc_cutoff_point)
dmalloc_cutoff_point = dmalloc_cutoff_generation;
@@ -307,7 +308,7 @@ void dmalloc_dump_outstanding ()
if (rc_history [i].addr == dp + 1) {
inhistory = 1;
if (!noted) {
log_info (" %s(%d): %d", dp -> file,
log_info (" %s(%d): %ld", dp -> file,
dp -> line, dp -> size);
noted = 1;
}
@@ -320,7 +321,7 @@ void dmalloc_dump_outstanding ()
} while (count--);
if (!inhistory)
#endif
log_info (" %s(%d): %d",
log_info (" %s(%d): %ld",
dp -> file, dp -> line, dp -> size);
}
#endif
@@ -353,7 +354,7 @@ void dump_rc_history (void *addr)
i += RC_HISTORY_MAX;
}
rc_history_count = 0;
while (rc_history [i].file) {
if (!addr || addr == rc_history [i].addr)
print_rc_hist_entry (i);
@@ -427,7 +428,6 @@ static int dmalloc_find_entry (struct dmalloc_preamble *dp,
int min, int max)
{
int middle;
int cmp;
middle = (min + max) / 2;
if (middle == min)
@@ -448,8 +448,7 @@ static int dmalloc_find_entry (struct dmalloc_preamble *dp,
void omapi_print_dmalloc_usage_by_caller ()
{
struct dmalloc_preamble *dp;
unsigned char *foo;
int ccur, cmax, i, j;
int ccur, cmax, i;
struct caller cp [1024];
cmax = 1024;
@@ -494,7 +493,9 @@ void omapi_print_dmalloc_usage_by_caller ()
for (i = 0; i < ccur; i++) {
printf ("%d\t%s:%d\t%d\n", i,
cp [i].dp -> file, cp [i].dp -> line, cp [i].count);
#if defined(DUMP_RC_HISTORY)
dump_rc_history (cp [i].dp + 1);
#endif
}
}
#endif /* DEBUG_MEMORY_LEAKAGE || DEBUG_MALLOC_POOL */

View File

@@ -364,7 +364,7 @@ omapi_message_process_internal (omapi_object_t *, omapi_object_t *);
isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
{
isc_result_t status;
#if defined (DEBUG_MEMORY_LEAKAGE)
#if defined (DEBUG_MEMORY_LEAKAGE) && 0
unsigned long previous_outstanding = dmalloc_outstanding;
#endif