summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);
}