Fix heap-use-after-free found when using asan

Fix https://github.com/libretro/RetroArch/issues/9871
This commit is contained in:
negativeExponent 2019-12-19 04:44:34 +08:00 committed by GitHub
parent 95e11234a7
commit d96409ff37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,8 +238,8 @@ void lzma_codec_free(void* codec)
lzma_allocator* alloc = &lzma_codec->allocator;
/* free memory */
lzma_allocator_free(alloc);
LzmaDec_Free(&lzma_codec->decoder, (ISzAlloc*)&lzma_codec->allocator);
lzma_allocator_free(alloc);
}
/*-------------------------------------------------