diff options
author | August Sodora <augsod@gmail.com> | 2011-11-17 21:06:16 -0500 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2011-11-18 09:29:54 +0100 |
commit | 48efe5ce26b519a1a87da1d0ee1acefcb000934e (patch) | |
tree | ba69aeb9f7d89e01c5929707a27d62765d39a3b9 /desktop/unx | |
parent | 2edba1241274cc5eec1c9a5c440a15f8bda62aa6 (diff) |
Valgrind: fixed memory leak
Diffstat (limited to 'desktop/unx')
-rw-r--r-- | desktop/unx/source/splashx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c index 0c7024de808a..3d3981d232f4 100644 --- a/desktop/unx/source/splashx.c +++ b/desktop/unx/source/splashx.c @@ -744,6 +744,12 @@ void splash_destroy(struct splash* splash) { if(splash->display) { + if(splash->gc) + { + XFreeGC(splash->display, splash->gc); + splash->gc = NULL; + } + XCloseDisplay( splash->display ); splash->display = NULL; png_destroy_read_struct( &(splash->png_ptr), &(splash->info_ptr), NULL ); |