Per Bojsen <[EMAIL PROTECTED]> writes: > *** 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.
Yes, but Linux isn't the only OS we support. Have you checked the man pages on *BSD, MacOS, Windows, Solaris, IRIX? It's just not safe to assume that libc's free() will check for NULL and work properly if you pass it NULL. g_free(), however, is known to be safe in all versions we care about. -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH [EMAIL PROTECTED] PGP key available _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel