From 3af26af19e94264dc575f4e68b6442092a2638bf Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 20 Jul 2013 13:15:10 +0000 Subject: [PATCH] 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. [originally from svn r9943] [r9919 == ea301bdd9b892a5e70692f82f5c0b98bd585e775] --- unix/gtkwin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }