From 170ebfd3544b28f6705dcaff1ddcf25af2af203e Mon Sep 17 00:00:00 2001 From: schmidt9 Date: Wed, 19 Jul 2017 16:03:11 +0300 Subject: [PATCH] Another memory leaks fix --- ios.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios.mm b/ios.mm index f790bbf..b4c20b3 100644 --- a/ios.mm +++ b/ios.mm @@ -204,6 +204,7 @@ bool extractTzdata(CFURLRef homeUrl, CFURLRef archiveUrl, std::string destPath) if (!success) { + CFRelease(tarUrl); CFRelease(tzdataPathUrl); CFRelease(writeStream); return false; @@ -256,6 +257,7 @@ bool extractTzdata(CFURLRef homeUrl, CFURLRef archiveUrl, std::string destPath) if (!success) { + CFRelease(tarUrl); CFRelease(tzdataPathUrl); return false; } @@ -270,6 +272,7 @@ bool extractTzdata(CFURLRef homeUrl, CFURLRef archiveUrl, std::string destPath) if (res != 0) { printf("error file size\n"); + CFRelease(tarUrl); CFRelease(tzdataPathUrl); return false; }