Skip to content

Commit 47f2e15

Browse files
authored
Merge pull request #2766 from klebertarcisio/klebertarcisio-patch-1
we need to end copiedArgs
2 parents 22a985e + caaf989 commit 47f2e15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CoreFoundation/String.subproj/CFString.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7078,7 +7078,8 @@ static Boolean __CFStringAppendFormatCore(CFMutableStringRef outputString, CFStr
70787078
newMaxArgNum = specs[curSpec].widthArgNum;
70797079
}
70807080
if (sizeArgNum < newMaxArgNum) {
7081-
if (specs != localSpecsBuffer) CFAllocatorDeallocate(tmpAlloc, specs);
7081+
if (numConfigs > 0) va_end(copiedArgs);
7082+
if (specs != localSpecsBuffer) CFAllocatorDeallocate(tmpAlloc, specs);
70827083
if (values != localValuesBuffer) CFAllocatorDeallocate(tmpAlloc, values);
70837084
if (formatChars && (formatChars != localFormatBuffer)) CFAllocatorDeallocate(tmpAlloc, formatChars);
70847085

0 commit comments

Comments
 (0)