On Friday 27 November 2009 11:45:50 Kevin Day wrote:
> I was looking at uClibc 0.9.28.3 to try and apply this patch and noticed:
>
> At the very end of your patch, the untouched code only has
> free(packet); while 0.9.28.3 has:
>         if (packet)
>                 free(packet);
>
> Does anybody know why was this safety check removed?

>From the Single Unix Specification version 4 (I.E. SUSv4, I.E. POSIX 2008):

  http://www.opengroup.org/onlinepubs/9699919799/functions/free.html

  > If ptr is a null pointer, no action shall occur.

I.E. free() has a null check built-in, as required by POSIX.

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to