Valgrind: fixed memory leak
This commit is contained in:
parent
2edba12412
commit
48efe5ce26
1 changed files with 6 additions and 0 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue