Fix memory leak when loading png files.
This commit is contained in:
parent
09299595fe
commit
a7bd060452
1 changed files with 1 additions and 1 deletions
|
@ -246,10 +246,10 @@ namespace cloonel {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
png_destroy_read_struct(&pngptr, &infoptr, nullptr);
|
|
||||||
retSurf = nullptr;
|
retSurf = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
png_destroy_read_struct(&pngptr, &infoptr, nullptr);
|
||||||
return retSurf;
|
return retSurf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue