Fix memory stomp in err_malloc

This commit is contained in:
Ron Pedde 2003-11-23 06:16:57 +00:00
parent 41746a0326
commit d334bfdb96

View File

@ -146,7 +146,7 @@ void *err_malloc(char *file, int line, size_t size) {
err_leakcheck();
DPRINTF(ERR_DEBUG,"---\n");
pnew=(ERR_LEAK*)malloc(sizeof(pnew));
pnew=(ERR_LEAK*)malloc(sizeof(ERR_LEAK));
if(!pnew)
log_err(1,"Error: cannot allocate leak struct\n");