summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Knight <james.d.knight@live.com>2015-06-22 11:56:00 -0400
committerJames Knight <james.d.knight@live.com>2015-06-22 11:56:00 -0400
commit5e6cbb6c8d1435b3122dfc55b6e5cfeefb1a3aab (patch)
tree3051548ff8704807893148d800596b15527fbc05
parent29e14cfa95aebd584dc0d7c751277c73911c41ae (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>
-rw-r--r--src/wallpaper.c3
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);