summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-29 02:10:27 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-29 02:10:27 (EDT)
commit32314f1b0b8dad95601516614f33eb2375616f64 (patch)
tree305ca87113bc3eb839503cda491925c95b07a2b5
parent0e3877ab2b39507fe3cd99d4559b7d5c62aa4615 (diff)
downloadmarquee-32314f1b0b8dad95601516614f33eb2375616f64.zip
marquee-32314f1b0b8dad95601516614f33eb2375616f64.tar.gz
marquee-32314f1b0b8dad95601516614f33eb2375616f64.tar.bz2
MqWebView: Fix use of save file name after free
-rw-r--r--src/web-view.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/web-view.c b/src/web-view.c
index c6ff0ad..84927fb 100644
--- a/src/web-view.c
+++ b/src/web-view.c
@@ -1038,7 +1038,6 @@ save_response_cb(GtkWidget *dialog, gint response_id, MqWebView *web_view)
filename = gtk_file_chooser_get_filename(
GTK_FILE_CHOOSER(dialog));
file = g_file_new_for_path(filename);
- g_free(filename);
active_id = gtk_combo_box_get_active_id(
web_view->save_type_combo_box);
@@ -1054,6 +1053,8 @@ save_response_cb(GtkWidget *dialog, gint response_id, MqWebView *web_view)
} else if (g_strcmp0(active_id, "mhtml") == 0) {
save_mhtml(web_view, file);
}
+
+ g_free(filename);
}
gtk_widget_destroy(dialog);