[network-manager-applet] fix use-after-free in vpn import error path (rh #498503)



commit a5f246b34a532f536d2d7d711a5bd9f132cffa2e
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Mon May 4 13:30:08 2009 -0400

    fix use-after-free in vpn import error path (rh #498503)
---
 src/connection-editor/vpn-helpers.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/connection-editor/vpn-helpers.c b/src/connection-editor/vpn-helpers.c
index a3dd403..1baa96b 100644
--- a/src/connection-editor/vpn-helpers.c
+++ b/src/connection-editor/vpn-helpers.c
@@ -211,7 +211,6 @@ import_vpn_from_file_cb (GtkWidget *dialog, gint response, gpointer user_data)
 	import_info.connection = NULL;
 	import_info.error = NULL;
 	g_hash_table_foreach (plugins, try_import, (gpointer) &import_info);
-	g_free (import_info.filename);
 
 	connection = import_info.connection;
 	if (connection) {
@@ -239,6 +238,7 @@ import_vpn_from_file_cb (GtkWidget *dialog, gint response, gpointer user_data)
 
 	if (import_info.error)
 		g_error_free (import_info.error);
+	g_free (filename);
 
 out:
 	gtk_widget_hide (dialog);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]