diff options
author | James Knight <james.d.knight@live.com> | 2015-06-22 11:56:00 -0400 |
---|---|---|
committer | James Knight <james.d.knight@live.com> | 2015-06-22 11:56:00 -0400 |
commit | 5e6cbb6c8d1435b3122dfc55b6e5cfeefb1a3aab (patch) | |
tree | 3051548ff8704807893148d800596b15527fbc05 /src | |
parent | 29e14cfa95aebd584dc0d7c751277c73911c41ae (diff) |
ensure fehbg is free'ed
The 'fehbg' variable can be allocated whether or not the user wishes to
generated a fehbg file. Ensure the variable is free'ed before we return.
Signed-off-by: James Knight <james.d.knight@live.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/wallpaper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallpaper.c b/src/wallpaper.c index 3e19c41..9327d74 100644 --- a/src/wallpaper.c +++ b/src/wallpaper.c @@ -465,8 +465,9 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, } free(path); } - free(fehbg); } + + if (fehbg) free(fehbg); /* create new display, copy pixmap to new display */ disp2 = XOpenDisplay(NULL); |