[Geany-devel] [Patch]: Fix memory leak in plugins/classbuilder.c

Daniel Marjamaki danielm77 at xxxxx
Wed May 19 15:43:42 UTC 2010



Hello!

This patch adds a missing g_free.

Original code:

            tmp_str =
g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_namespace_entry)));
            if (! utils_str_equal(tmp_str, ""))
                class_info->namespace_decl = g_strdup_printf("namespace
%s;", tmp_str);
            else
                class_info->namespace_decl = g_strdup("");
            // missing g_free here

            tmp_str =
g_strdup(gtk_entry_get_text(GTK_ENTRY(cc_dlg->class_implements_entry)));





<P><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Köp bläckpatron, toner eller fotopapper för 1 kr hos Inkclub. Beställ före kl. 19 <br /> för leverans till din hemadress redan nästa vardag.  Det är bekvämt, snabbt och <br />enkelt.  Beställ på <a style="font-family: Tahoma, sans-serif; font-size: 12px; color: #00f" href="http://secure-dk.imrworldwide.com/cgi-bin/b?ci=aller-kampanj-se&cg=spray&tu=
http%3A%2F%2Fwww.inkclub.com%252Fspraylinkfeb10" target="_blank"> www.inkclub.com.</a> </font>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20100519/3772268d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deallocate.diff
Type: application/octet-stream
Size: 487 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100519/3772268d/attachment.obj>


More information about the Devel mailing list