X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=windows%2Fwinplink.c;h=0819934cbb1b7797ce59fc5b4978c0d31688d1ff;hb=12e019bafc75cb441e965c63e15dfceeaf71ca1e;hp=fbeb538f4658bcd3e6397fdcd69658350ab7e1e7;hpb=74278dcd646caee3f9317c97be88645b2af0c038;p=PuTTY.git diff --git a/windows/winplink.c b/windows/winplink.c index fbeb538f..0819934c 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -29,6 +29,10 @@ void fatalbox(char *p, ...) vfprintf(stderr, p, ap); va_end(ap); fputc('\n', stderr); + if (logctx) { + log_free(logctx); + logctx = NULL; + } cleanup_exit(1); } void modalfatalbox(char *p, ...) @@ -39,6 +43,10 @@ void modalfatalbox(char *p, ...) vfprintf(stderr, p, ap); va_end(ap); fputc('\n', stderr); + if (logctx) { + log_free(logctx); + logctx = NULL; + } cleanup_exit(1); } void connection_fatal(void *frontend, char *p, ...) @@ -49,6 +57,10 @@ void connection_fatal(void *frontend, char *p, ...) vfprintf(stderr, p, ap); va_end(ap); fputc('\n', stderr); + if (logctx) { + log_free(logctx); + logctx = NULL; + } cleanup_exit(1); } void cmdline_error(char *p, ...)