[Geany-devel] [Patch] memory leak in src/build.c
Daniel Marjamäki
daniel.marjamaki at xxxxx
Wed Sep 8 19:02:34 UTC 2010
Hello!
I have another fix for a memory leak. Here is the code:
static void process_build_output_line(const gchar *str, gint color)
{
gchar *msg, *tmp;
gchar *filename;
gint line;
msg = g_strdup(str);
g_strchomp(msg);
if (! NZV(msg))
return;
.....
The patch:
Index: src/build.c
===================================================================
--- src/build.c (revision 5207)
+++ src/build.c (arbetskopia)
@@ -996,7 +996,10 @@
g_strchomp(msg);
if (! NZV(msg))
+ {
+ g_free(msg);
return;
+ }
if (build_parse_make_dir(msg, &tmp))
{
Best regards,
Daniel
More information about the Devel
mailing list