From: simon Date: Sat, 20 Jul 2013 13:15:10 +0000 (+0000) Subject: Redo a mis-fix of a memory leak in r9919: I added sfree(data) X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/5462f4596108c4309fb69b4e57aa1e59d7100908 Redo a mis-fix of a memory leak in r9919: I added sfree(data) 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 --- diff --git a/unix/gtkwin.c b/unix/gtkwin.c index ad8ade52..667c72b3 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -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; }