gmem: Clarify that a NULL check is not needed before calling g_free()
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 19 Dec 2014 19:01:06 +0000 (19:01 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 3 Mar 2015 18:40:33 +0000 (18:40 +0000)
commit18c9a4e17a74b1707b8a17779e13956e151edc27
tree267a2090bd3b7e5d7516d96e8bc264891f0fb999
parent984576c01e54f335a1a2cde9e6f235946bd35f96
gmem: Clarify that a NULL check is not needed before calling g_free()

It was documented before, but wasn’t especially clear. Doing
    if (X)
        g_free (X);
is apparently quite a pervasive real-world anti-pattern, so perhaps it
could be documented more explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=741779
glib/gmem.c