Merge pull request #35425 from timothyqiu/assetlib-import-leak

Fixes leak when importing zip in AssetLib
This commit is contained in:
Rémi Verschelde 2020-01-22 07:40:50 +01:00 committed by GitHub
commit 2ee15f650e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -97,6 +97,7 @@ int zipio_close(voidpf opaque, voidpf stream) {
FileAccess *&f = *(FileAccess **)opaque; FileAccess *&f = *(FileAccess **)opaque;
if (f) { if (f) {
f->close(); f->close();
memdelete(f);
f = NULL; f = NULL;
} }
return 0; return 0;