safe_free or if(x) free(x)

andreas moroder claudiamoroder at st-ulrich.suedtirol.net
Fri Sep 14 12:57:02 GMT 2001


Hello,

I counted 193 occurences of safe_free in the source files but i counted also 
more then hundred lines of code where I found a 'if' and a free() statement 
in the same line.

Is there a reason that both variants are used ?

Wouldn't it be more efficient to rewite safe_free as a macro, like the 
dlinklist macros ?

Bye 
Andreas




More information about the samba-technical mailing list