[gnome-commander] Fix for memory leak



commit 528f3dd60aac5492975ac02cb24f4e009a633af0
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Tue Dec 13 22:43:32 2011 +0100

    Fix for memory leak

 src/gnome-cmd-con-remote.cc |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-con-remote.cc b/src/gnome-cmd-con-remote.cc
index dc9bca6..b4545b9 100644
--- a/src/gnome-cmd-con-remote.cc
+++ b/src/gnome-cmd-con-remote.cc
@@ -243,14 +243,14 @@ GnomeCmdConRemote *gnome_cmd_con_remote_new (const gchar *alias, const string &u
 
     g_return_val_if_fail (uri != NULL, NULL);
 
-    const gchar *host = gnome_vfs_uri_get_host_name (uri);      // do not g_free
-    const gchar *password = gnome_vfs_uri_get_password (uri);   // do not g_free
-    gchar *path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
-
     GnomeCmdConRemote *server = (GnomeCmdConRemote *) g_object_new (GNOME_CMD_TYPE_CON_REMOTE, NULL);
 
     g_return_val_if_fail (server != NULL, NULL);
 
+    const gchar *host = gnome_vfs_uri_get_host_name (uri);      // do not g_free
+    const gchar *password = gnome_vfs_uri_get_password (uri);   // do not g_free
+    gchar *path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
+
     GnomeCmdCon *con = GNOME_CMD_CON (server);
 
     gnome_cmd_con_set_alias (con, alias);



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