use of malloc

Ulrich Drepper drepper@redhat.com
Mon Apr 24 23:24:00 GMT 2000


Thorsten Kukuk <kukuk@suse.de> writes:

> Uli, please look at the ChangeLog file. You have removed similar free's
> in other parts of the NIS code.

In some of them.  But not the once where we terminated a function in
the case we found an error != ENOMEM.  This happened in the function I
changed together with the missing frees in the __nis_destroy_callback.
This must have leaked quite a lot.

> And your new Code is wrong. You derefence NULL Pointer !!!!!

Where?

> Please remove it complete and don't change code, which you don't
> understand in such a way.

Well, I understand enough to see that the functions are leaking a lot
of memory during normal operation.

> What do you think is xdr_free () good for ?

Something which is allocated using calloc() can be freed using free.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Libc-hacker mailing list