[ldns-users] ldns_buffer_free() function bug?

Zbynek Michl zbynek.michl at nic.cz
Thu Aug 26 09:04:16 UTC 2010


I have a question about ldns_buffer_free() function. Its prototype is

   void ldns_buffer_free(ldns_buffer *buffer);

but shouldn't it be

   void ldns_buffer_free(ldns_buffer **buffer);

(pointer to pointer)?

Because using LDNS_FREE macro only memory is freed, but original pointer passed 
to the function remains at its original address (is not set to NULL). Currently 
only local copy of that pointer is set to NULL.


More information about the ldns-users mailing list