[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some memory management problems

On 12 Apr 2000, Assar Westerlund wrote:

> Where do you have problems with freeing NULL and mallocing 0 bytes?
> If it's with efence you can probably solve the last problem by setting

I've got segmentation faults in free_general_string and free_octet_string. 
I have used dmalloc and gdb to debug the problem. The "ptr = NULL" style
assignments in my patch made the segfaults go away, and the tests for
malloc'ing 0 bytes and free'ing NULL made dmalloc to shut up. So these
tests may not be neccessary, but resetting pointers to NULL after they'd
been freed is neccessary.


Gabor Gombas                                       Eotvos Lorand University
E-mail: gombasg@inf.elte.hu                        Hungary