Skip to content

Commit 8596f2a

Browse files
committed
Fix memory leak
1 parent 9ebb444 commit 8596f2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CoreFoundation/URL.subproj/CFURL.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4815,9 +4815,9 @@ CFURLRef CFURLCreateCopyAppendingPathComponent(CFAllocatorRef allocator, CFURLRe
48154815
if (isDirectory) {
48164816
CFStringInsert(newString, pathRg.location + pathRg.length + CFStringGetLength(newComp), CFSTR("/"));
48174817
}
4818-
CFRelease(newComp);
48194818
result = _CFURLCreateWithArbitraryString(allocator, newString, url->_base);
48204819
}
4820+
if (newComp) CFRelease(newComp);
48214821
CFRelease(newString);
48224822
}
48234823
}

0 commit comments

Comments
 (0)