]> Pileus Git - aweather/commitdiff
Fix memory leaks
authorAndy Spencer <andy753421@gmail.com>
Thu, 27 Oct 2011 07:22:23 +0000 (07:22 +0000)
committerAndy Spencer <andy753421@gmail.com>
Thu, 27 Oct 2011 07:23:00 +0000 (07:23 +0000)
src/Makefile.am
src/aweather-gui.c
src/main.c

index b0852f26d93d24f56846bad49572c9fd0dc3db3d..b72794b611c36888c3401567e652f5414e5592ae 100644 (file)
@@ -51,3 +51,15 @@ gdb: all
 
 ddd: all
        ddd .libs/aweather
+
+memcheck: all
+       G_SLICE=always-malloc                   \
+       G_DEBUG=gc-friendly,resident-modules    \
+       valgrind --track-origins=yes            \
+                --leak-check=full              \
+                --leak-resolution=high         \
+                --num-callers=50               \
+                --suppressions=gtk.suppression \
+                --suppressions=/usr/lib/valgrind/default.supp \
+                .libs/aweather                 \
+       2> valgrind.out
index 0f87d43c8a4745372aa1db7d695fcd6f3ebe1699..b08196ac04921825cf79d1adf6839ee22cb8325d 100644 (file)
@@ -387,6 +387,7 @@ static void prefs_setup(AWeatherGui *self)
                GtkTreeIter iter;
                if (gtk_tree_model_find_string(model, &iter, NULL, 0, is))
                        gtk_combo_box_set_active_iter(GTK_COMBO_BOX(isw), &iter);
+               g_free(is);
        }
 
        /* Load Plugins */
index 9c0384d575306e00a833ae09b468370e269a14fd..89eeda7b9f552e093ac8aecaf5840a6b7b4f34d3 100644 (file)
@@ -159,6 +159,7 @@ int main(int argc, char *argv[])
        grits_viewer_set_offline(gui->viewer, offline);
        set_toggle_action(gui, "update",     autoupdate);
        set_toggle_action(gui, "fullscreen", fullscreen);
+       g_free(prefs_site);
 
        /* Done with init, show gui */
        gtk_widget_show_all(GTK_WIDGET(gui));