From 48efe5ce26b519a1a87da1d0ee1acefcb000934e Mon Sep 17 00:00:00 2001 From: August Sodora Date: Thu, 17 Nov 2011 21:06:16 -0500 Subject: Valgrind: fixed memory leak --- desktop/unx/source/splashx.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'desktop/unx/source') 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 ); -- cgit