Hi all,

as Luis Fernando pointed out in a mail, free(NULL) is defined to be valid in
C. So far, I still guarded this sequence as follows:

if(p != NULL)
   free(p);

Because I had "a bad feeling" about portability. I begin to think that this
may be overly conservative. If it is actually not needed, code cleanup may be
useful (it is always a bad idea to do things more complex than necessary...).

Comments on the issue would be appreciated.

Thanks,
Rainer
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to