From 2650f0df7f1c75659292cd8933a95d695d6b2963 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 8 May 2019 13:46:35 -0700 Subject: [PATCH] TestFoundation: fix a double free No allocation was made to perform the explicit deallocation. Doing so causes a double free which the Windows C library caught. --- TestFoundation/TestNSKeyedArchiver.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/TestFoundation/TestNSKeyedArchiver.swift b/TestFoundation/TestNSKeyedArchiver.swift index 56977bf56b..8ab1ddd537 100644 --- a/TestFoundation/TestNSKeyedArchiver.swift +++ b/TestFoundation/TestNSKeyedArchiver.swift @@ -295,11 +295,6 @@ class TestNSKeyedArchiver : XCTestCase { let s1 = String(cString: charPtr) let s2 = String(cString: expectedCharPtr!) -#if !DEPLOYMENT_RUNTIME_OBJC - // On Darwin decoded strings would belong to the autorelease pool, but as we don't have - // one in SwiftFoundation let's explicitly deallocate it here. - expectedCharPtr!.deallocate() -#endif return s1 == s2 }) }