- check_free shouldn't be called with a NULL pointer
- I needed to increase DBG_ARRY_SZ to handle larger alloc count
(perhaps should we use realloc here to grow dynamically?)
- cf_gen.c used inconsitently alloc funcs: xcalloc() but free(),
resulting in check_free() to assert during make using cf_gen
Submitted by: Andres Kroomnaa <andre@online.ee>
/*
- * $Id: util.c,v 1.73 2000/10/20 23:50:59 hno Exp $
+ * $Id: util.c,v 1.74 2000/11/25 16:02:14 adrian Exp $
*
* DEBUG:
* AUTHOR: Harvest Derived
#endif
#if XMALLOC_DEBUG
-#define DBG_ARRY_SZ (1<<10)
+#define DBG_ARRY_SZ (1<<11)
#define DBG_ARRY_BKTS (1<<8)
static void *(*malloc_ptrs)[DBG_ARRY_SZ];
static int malloc_size[DBG_ARRY_BKTS][DBG_ARRY_SZ];
#endif
#if XMALLOC_DEBUG
- check_free(s);
+ if (s != NULL)
+ check_free(s);
#endif
if (s != NULL)
free(s);
/*
- * $Id: cf_gen.cc,v 1.36 2000/06/06 19:34:31 hno Exp $
+ * $Id: cf_gen.cc,v 1.37 2000/11/25 16:02:14 adrian Exp $
*
* DEBUG: none Generate squid.conf and cf_parser.c
* AUTHOR: Max Okumoto
line = def;
def = line->next;
fprintf(fp, "# %s\n", line->data);
- free(line->data);
- free(line);
+ xfree(line->data);
+ xfree(line);
}
blank = 1;
}