diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-05-02 14:48:53 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-05-02 14:48:53 +0200 |
commit | 04c5cf2fb330d1336076262e44914bb2a02821a5 (patch) | |
tree | f805f4fc9c9d94a7e1b5084dbb4e6891969372b7 | |
parent | 833ed262dba9dcfcc056244937b0f4c9036b4477 (diff) | |
parent | 1db314934f025b080908a0794c41d70a15120d67 (diff) |
Merge branch 'neosilky-memleak'
-rw-r--r-- | src/wallpaper.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallpaper.c b/src/wallpaper.c index b6f2c0c..a11a50d 100644 --- a/src/wallpaper.c +++ b/src/wallpaper.c @@ -292,7 +292,7 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, Atom prop_root, prop_esetroot, type; int format, i; unsigned long length, after; - unsigned char *data_root, *data_esetroot; + unsigned char *data_root = NULL, *data_esetroot = NULL; Pixmap pmap_d1, pmap_d2; gib_list *l; @@ -550,6 +550,13 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, } } } + + if (data_root) + XFree(data_root); + + if (data_esetroot) + XFree(data_esetroot); + /* This will locate the property, creating it if it doesn't exist */ prop_root = XInternAtom(disp2, "_XROOTPMAP_ID", False); prop_esetroot = XInternAtom(disp2, "ESETROOT_PMAP_ID", False); |