From 142f3b23742df53b1a93aceaf14f3866dbe7fb94 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Tue, 17 Sep 2013 21:51:43 +0200 Subject: [PATCH] Now correctly freeing xml variable in ag_app_open_chart() --- src/ag-app.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ag-app.c b/src/ag-app.c index f4dcf40..d54c633 100644 --- a/src/ag-app.c +++ b/src/ag-app.c @@ -219,6 +219,7 @@ ag_app_open_chart(AgApp *app, GFile *file) if ((doc = xmlReadMemory(xml, length, "chart.xml", NULL, 0)) == NULL) { // TODO: Warn with a popup or similar way g_warning("Saved chart is corrupt (or not a saved chart at all)"); + g_free(xml); g_free(uri); return; @@ -228,6 +229,7 @@ ag_app_open_chart(AgApp *app, GFile *file) // TODO: Warn with a popup or similar way g_warning("Could not initialize XPath"); xmlFreeDoc(doc); + g_free(xml); g_free(uri); return; @@ -259,6 +261,7 @@ ag_app_open_chart(AgApp *app, GFile *file) g_variant_unref(minute); g_variant_unref(second); + g_free(xml); g_free(uri); xmlXPathFreeContext(xpathCtx); xmlFreeDoc(doc);