summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-04-06 15:15:08 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-04-06 15:15:08 +0200
commit1e179e0beb40d7f6eb1e30d13d4eaa94519d4492 (patch)
tree6fe7ff4bc59e27adf5aa33c979c17b36d05b23b2 /src
parent9e8eea062a081d4ff5b7897e3fcd7b2633cc4785 (diff)
im_weprintf: fix memory leak when winwidget is not set
Diffstat (limited to 'src')
-rw-r--r--src/imlib.c2
1 files changed, 2 insertions, 0 deletions
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);
}