summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-30 00:41:58 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-30 00:41:58 (EDT)
commit72799aaac27ac509802905b32483489e0ef73d58 (patch)
tree1d40efe914a9537b0b7ec9ea8bfee98ade3471f5
parent5288163dff56c6541b082e3daa9916a6dd0de383 (diff)
downloadmarquee-72799aaac27ac509802905b32483489e0ef73d58.zip
marquee-72799aaac27ac509802905b32483489e0ef73d58.tar.gz
marquee-72799aaac27ac509802905b32483489e0ef73d58.tar.bz2
MqWebView: Free saved HTML document
-rw-r--r--src/web-view.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/web-view.c b/src/web-view.c
index c8fded2..f87a845 100644
--- a/src/web-view.c
+++ b/src/web-view.c
@@ -926,10 +926,11 @@ mq_web_view_open(MqWebView *web_view)
}
static void
-save_html_replace_cb(GFile *file, GAsyncResult *result)
+save_html_replace_cb(GFile *file, GAsyncResult *result, guchar *data)
{
g_file_replace_contents_finish(file, result, NULL, NULL);
/* TODO: Error handling? */
+ g_free(data);
}
static void
@@ -944,7 +945,7 @@ save_html_get_data_cb(WebKitWebResource *resource, GAsyncResult *result,
g_file_replace_contents_async(web_view->save_file,
(gchar *) data, length,
NULL, FALSE, G_FILE_CREATE_REPLACE_DESTINATION, NULL,
- (GAsyncReadyCallback) save_html_replace_cb, NULL);
+ (GAsyncReadyCallback) save_html_replace_cb, data);
}
static void