Subject: is free() broken or am I broken :)
To: None <current-users@netbsd.org>
From: Hisashi T Fujinaka <htodd@twofifty.com>
List: current-users
Date: 08/14/2002 10:24:52
This only just showed up, and I just recompiled world yesterday, so I
don't know if it's me or gcc.

I've got a function that passes back an array, that I've malloc'ed within
the function using:
double * returnArray = (double *)malloc((size_t)(3 * sizeof(double)));

The rest of the code looks sort of like:

double * returnArray = transform(initialArray);

... do some stuff ...

free(returnArray);

dmalloc from pkgsrc shows that I'm not freeing returnArray, ever. Do I
trust dmalloc?

Anyone have any ideas?

-- 
Hisashi T Fujinaka - htodd@twofifty.com
BSEE (6/86) + BSChem (3/95) + BAEnglish (8/95) + $2.50 = mocha latte