1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-03 08:11:03 +02:00

36026: zero freed pointers in zftp cleanup_() in case the module is re-loaded after unloading

This commit is contained in:
Barton E. Schaefer 2015-08-09 16:10:47 -07:00
parent 9958684574
commit a88415cbf7
2 changed files with 5 additions and 0 deletions

View file

@ -16,6 +16,9 @@
2015-08-09 Barton E. Schaefer <schaefer@zsh.org> 2015-08-09 Barton E. Schaefer <schaefer@zsh.org>
* 36026: Src/Modules/zftp.c: zero freed pointers in cleanup_()
in case the module is re-loaded after unloading.
* 36022: Src/loop.c: fix bug that some loop constructs could * 36022: Src/loop.c: fix bug that some loop constructs could
not be interrupted if all they did was variable assignments or not be interrupted if all they did was variable assignments or
math expressions math expressions

View file

@ -3149,9 +3149,11 @@ zftp_cleanup(void)
zfclose(zfsess != cursess); zfclose(zfsess != cursess);
} }
zsfree(lastmsg); zsfree(lastmsg);
lastmsg = NULL;
zfunsetparam("ZFTP_SESSION"); zfunsetparam("ZFTP_SESSION");
freelinklist(zfsessions, (FreeFunc) freesession); freelinklist(zfsessions, (FreeFunc) freesession);
zfree(zfstatusp, sizeof(int)*zfsesscnt); zfree(zfstatusp, sizeof(int)*zfsesscnt);
zfstatusp = NULL;
} }
static int static int