diff --git a/src/imlib.c b/src/imlib.c index 9aa166f777fa9d9e10b149b1175514d4be50cdf9..4f7ff243eecc5d326572057451466c9bc617cd7f 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) { diff --git a/src/winwidget.c b/src/winwidget.c index ae34045682982242056240d64448d0489522f3c5..0a9adc888b606fe03d8a66f64d0d89a2374b0fc1 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;