From 8c8c1d5d52096a24e751f07d94972253a0e5054c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 28 Mar 2012 10:53:32 +0200 Subject: feh_magick_load_image: Fix memory leak when encountering unloadable file --- src/imlib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/imlib.c b/src/imlib.c index eda3e2a..09391fa 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -305,6 +305,7 @@ static char *feh_magick_load_image(char *filename) if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) { close(fd); unlink(sfn); + free(sfn); sfn = NULL; if (!opt.quiet) { -- cgit v1.2.3 From 82a976e0909e02ba8c25e4fd10d0e56a3e5c13ca Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 29 Mar 2012 00:47:42 +0200 Subject: winwidget_allocate: memset winwid to zero --- src/winwidget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/winwidget.c b/src/winwidget.c index ae34045..0a9adc8 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -42,6 +42,7 @@ static winwidget winwidget_allocate(void) winwidget ret = NULL; ret = emalloc(sizeof(_winwidget)); + memset(ret, 0, sizeof(_winwidget)); ret->win = 0; ret->w = 0; -- cgit v1.2.3