summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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