mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
PSFTP: fix memory leak opening two consecutive sessions.
Testing the script described in the previous commit message, Leak Sanitiser pointed out that we didn't free the LogContext from the first connection, and overwrote the pointer variable with the one from the second.
This commit is contained in:
parent
6370782de7
commit
05a6699939
4
psftp.c
4
psftp.c
@ -2386,6 +2386,10 @@ static void do_sftp_cleanup(void)
|
|||||||
sfree(homedir);
|
sfree(homedir);
|
||||||
homedir = NULL;
|
homedir = NULL;
|
||||||
}
|
}
|
||||||
|
if (psftp_logctx) {
|
||||||
|
log_free(psftp_logctx);
|
||||||
|
psftp_logctx = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_sftp(int mode, int modeflags, char *batchfile)
|
int do_sftp(int mode, int modeflags, char *batchfile)
|
||||||
|
Loading…
Reference in New Issue
Block a user