On Thu, 2006-11-09 at 22:07 -0500, Per Bojsen wrote:
> *** Regarding Re: r15098 - gnucash/trunk/src/gnome-utils -
>     gnc_history_get_last() can return NULL.; Derek Atkins
>     <[EMAIL PROTECTED]> adds:
> 
> Derek> free() still doesn't check, but g_free() does.
> 
> Actually at least on Linux, according to man 3 free:
> 
>   If ptr is NULL, no operation is performed.
> 
> I don't have my K&R handy so I am not sure if the C standard specifies
> this.  However, the man page states that it conforms to C89 and C99.
> free() is from glibc and I'm pretty sure it's been like this for quite
> a few years.

In old standard C, it was not allowed to free a null pointer; in ANSI C
it is explicitly allowed.

Thomas

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to