Valgrind: fixed memory leak

This commit is contained in:
August Sodora 2011-11-17 21:06:16 -05:00 committed by Lionel Elie Mamane
parent 2edba12412
commit 48efe5ce26

View file

@ -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 );