Revision: 5171 http://geany.svn.sourceforge.net/geany/?rev=5171&view=rev Author: ntrel Date: 2010-08-16 17:02:45 +0000 (Mon, 16 Aug 2010)
Log Message: ----------- Fix memory leak in read_regex().
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-16 16:54:59 UTC (rev 5170) +++ trunk/ChangeLog 2010-08-16 17:02:45 UTC (rev 5171) @@ -8,6 +8,8 @@ thanks). * src/build.c: Fix saving non-project filetype error regex. + * src/build.c: + Fix memory leak in read_regex().
2010-08-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2010-08-16 16:54:59 UTC (rev 5170) +++ trunk/src/build.c 2010-08-16 17:02:45 UTC (rev 5171) @@ -2130,7 +2130,7 @@ static gboolean read_regex(GtkWidget *regexentry, gchar **src, gchar **dst) { gboolean changed = FALSE; - gchar *reg = g_strdup(gtk_entry_get_text(GTK_ENTRY(regexentry))); + const gchar *reg = gtk_entry_get_text(GTK_ENTRY(regexentry));
if ( ( @@ -2146,7 +2146,7 @@ { if (dst != NULL) { - setptr(*dst, reg); + setptr(*dst, g_strdup(reg)); changed = TRUE; } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.