Another memory leaks fix

This commit is contained in:
schmidt9
2017-07-19 16:03:11 +03:00
committed by Howard Hinnant
parent a5b77bb0fe
commit 170ebfd354

3
ios.mm
View File

@@ -204,6 +204,7 @@ bool extractTzdata(CFURLRef homeUrl, CFURLRef archiveUrl, std::string destPath)
if (!success) if (!success)
{ {
CFRelease(tarUrl);
CFRelease(tzdataPathUrl); CFRelease(tzdataPathUrl);
CFRelease(writeStream); CFRelease(writeStream);
return false; return false;
@@ -256,6 +257,7 @@ bool extractTzdata(CFURLRef homeUrl, CFURLRef archiveUrl, std::string destPath)
if (!success) if (!success)
{ {
CFRelease(tarUrl);
CFRelease(tzdataPathUrl); CFRelease(tzdataPathUrl);
return false; return false;
} }
@@ -270,6 +272,7 @@ bool extractTzdata(CFURLRef homeUrl, CFURLRef archiveUrl, std::string destPath)
if (res != 0) if (res != 0)
{ {
printf("error file size\n"); printf("error file size\n");
CFRelease(tarUrl);
CFRelease(tzdataPathUrl); CFRelease(tzdataPathUrl);
return false; return false;
} }