From af5873482693967418235b739da7396c453ee326 Mon Sep 17 00:00:00 2001 From: Moshe Kaplan Date: Wed, 30 Jul 2014 22:09:25 -0400 Subject: [PATCH] Fix Ztable memory leaks --- plugins/CDVDiso/src/libiso.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/CDVDiso/src/libiso.cpp b/plugins/CDVDiso/src/libiso.cpp index 577a00a808..7e48f85716 100644 --- a/plugins/CDVDiso/src/libiso.cpp +++ b/plugins/CDVDiso/src/libiso.cpp @@ -323,6 +323,7 @@ int _isoReadZ2table(isoFile *iso) if (iso->Ztable == NULL) { + free(Ztable); return -1; } @@ -367,7 +368,11 @@ int _isoReadBZ2table(isoFile *iso) _closefile(handle); iso->Ztable = (char*)malloc(iso->blocks * 8); - if (iso->Ztable == NULL) return -1; + if (iso->Ztable == NULL){ + free(Ztable); + return -1; + } + ofs = 16;