From 1e179e0beb40d7f6eb1e30d13d4eaa94519d4492 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 6 Apr 2015 15:15:08 +0200 Subject: im_weprintf: fix memory leak when winwidget is not set --- src/imlib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/imlib.c b/src/imlib.c index 36c8dff..b3bf04b 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -566,6 +566,8 @@ void im_weprintf(winwidget w, char *fmt, ...) if (fmt[0] != '\0' && fmt[strlen(fmt) - 1] == ':') fprintf(stderr, " %s", strerror(errno)); fputs("\n", stderr); + if (!w) + free(errstr); } -- cgit v1.2.3