[Glade-devel] A (not so) little issue at gladeui/glade-project.c:1492



Thanks Johannes,

I'm sorry, I made the mistake of watching a previous version and I see that the
code it's ok in GIT.

Thank you very much for pointing the correct way to free.

2015-02-20 4:32 GMT-03:00 Johannes Schmid <jhs at jsschmid.de>:

Hi Juan!

In gladeui/glade-project.c:1492, the call to g_free (required_lib) not
always leave required_lib in NULL, at least for me, so the condition !
required_lib fail in the remaining bucles. Of cource, this occurs when
I use more than one requires-tag and can't use my own plugins.

I don't fully see your point. required_lib is free'd in the last else
branch and when the loop continues, the first thing is to initialize it
to NULL
(https://git.gnome.org/browse/glade/tree/gladeui/glade-project.c#n1443).
So it shouldn't be a problem that it isn't being set to NULL.

Sidenote: The correct way to free it and set it to NULL would be
g_clear_pointer (&required_lib, g_free) but that shouldn't be necessary
here.


Regards,
Johannes


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/glade-devel/attachments/20150220/2e225eca/attachment.html>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]