[Geany-devel] [Patch] after g_strndup, use g_free instead of free
enrico.troeger at xxxxx
Sun May 16 17:46:45 UTC 2010
On Fri, 14 May 2010 23:23:20 -0700, Daniel wrote:
> I believe g_strndup should be followed by g_free. I tested that the
> code compiles and runs. But no real runtime testing was done.
Thank you, committed.
Just for clarity, there is no technical requirement that g_strndup() or
similar should be followed by a g_free() instead of free().
g_free() simply calls free() with the difference that it checks for a
NULL pointer before which is good in most cases.
And using g_free() there is also better for readability.
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: not available
More information about the Devel