safe_free patch
andreas moroder
claudiamoroder at st-ulrich.suedtirol.net
Sun Sep 16 08:06:02 GMT 2001
Last week I asked why free() and safe_free() is utilized.
Simo told me that this happens because there is old and new code and if I
want I can send in a patch.
Here it is.
I changed most occurences of free AND safe_free to SAFE_FREE
this not only check if the pointer is != NULL before the free, the macro also
sets the pointer to NULL.
The code becomes also more readable.
There are few places ( nt_printing etc. ) where I did not change safe_free to
SAFE_FREE because the call is in a for ( ,,) statement.
I compressed the patch because it is too big uncompressed.
Bye
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: safe.patch.gz
Type: application/x-gzip
Size: 30100 bytes
Desc: safe_patch
Url : http://lists.samba.org/archive/samba-technical/attachments/20010916/b094efdb/safe.patch.bin
More information about the samba-technical
mailing list