Skip to content

Commit 7dbc009

Browse files
authored
Merge pull request #2816 from valeriyvan/CFTimeZoneLeak
Fix memory leak in function CFTimeZoneCreateWithName
2 parents 69a8ecd + a493212 commit 7dbc009

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CoreFoundation/NumberDate.subproj/CFTimeZone.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,8 @@ CFTimeZoneRef CFTimeZoneCreateWithName(CFAllocatorRef allocator, CFStringRef nam
15951595
#endif
15961596
CFRelease(dict);
15971597
if (CFEqual(CFSTR(""), name)) {
1598+
if (baseURL) CFRelease(baseURL);
1599+
if (data) CFRelease(data);
15981600
return NULL;
15991601
}
16001602
}

0 commit comments

Comments
 (0)