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)
{
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;
}