diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-04-06 15:15:08 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-04-08 11:10:56 +0200 |
commit | 834a438b0250e226f7ae2c2f33f7a27f18f55450 (patch) | |
tree | 257775d77148a5f87a830db874e1136f42ca1f70 /src/imlib.c | |
parent | d6506991916e339dba8a72f41908164a15209b68 (diff) |
im_weprintf: fix memory leak when winwidget is not set
Diffstat (limited to 'src/imlib.c')
-rw-r--r-- | src/imlib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/imlib.c b/src/imlib.c index c8bb993..29ec5be 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); } |