Redo a mis-fix of a memory leak in r9919: I added sfree(data)
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 20 Jul 2013 13:15:10 +0000 (13:15 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 20 Jul 2013 13:15:10 +0000 (13:15 +0000)
immediately after conf_deserialise in the Duplicate Session receiver,
whereas I should have put it after the subsequent loop that extracts
the pty argv if any.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9943 cda61777-01e9-0310-a592-d414129be87e

unix/gtkwin.c

index ad8ade5..667c72b 100644 (file)
@@ -3344,7 +3344,6 @@ int read_dupsession_data(struct gui_data *inst, Conf *conf, char *arg)
     }
 
     size_used = conf_deserialise(conf, data, size);
-    sfree(data);
     if (use_pty_argv && size > size_used) {
        int n = 0;
        i = size_used;
@@ -3371,6 +3370,8 @@ int read_dupsession_data(struct gui_data *inst, Conf *conf, char *arg)
        }
     }
 
+    sfree(data);
+
     return 0;
 }