OSDN Git Service

LinGui: fix another memory leak
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 12 Sep 2008 17:20:37 +0000 (17:20 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 12 Sep 2008 17:20:37 +0000 (17:20 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@1692 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/main.c
gtk/src/plist.c

index 43d7879..23ed044 100644 (file)
@@ -571,8 +571,6 @@ main (int argc, char *argv[])
        g_timeout_add (500, ghb_timer_cb, (gpointer)ud);
        // Everything should be go-to-go.  Lets rock!
        gtk_main ();
-       //I'd like to do this, but hb threads seem to persist for a while
-       //so closing crashes :(
        ghb_backend_close();
        if (ud->queue)
                ghb_value_free(ud->queue);
index 79da274..cb9b0e2 100644 (file)
@@ -377,6 +377,8 @@ ghb_plist_parse(const gchar *buf, gssize len)
        g_markup_parse_context_parse(ctx, buf, len, &err);
        g_markup_parse_context_end_parse(ctx, &err);
        g_markup_parse_context_free(ctx);
+       if (pd.key) g_free(pd.key);
+       if (pd.value) g_free(pd.value);
        g_queue_free(pd.stack);
        g_queue_free(pd.tag_stack);
        return pd.plist;