forked from HowardHinnant/date
Another memory leaks fix
This commit is contained in:
3
ios.mm
3
ios.mm
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user