Another memory leaks fix

This commit is contained in:
schmidt9 authored and Howard Hinnant committed 2017-07-22 12:00:52 -04:00
1 parent a5b77bb0fe
commit 170ebfd354
1 file changed
+3
+3
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;
}