@@ -193,13 +193,11 @@ si.hStdOutput = _readPipe[1]; si.hStdError = GetStdHandle(STD_ERROR_HANDLE); si.dwFlags |= STARTF_USESTDHANDLES; length = argumentsString.UTF16StringLength; - argumentsCopy = [self - allocMemoryWithSize: sizeof(of_char16_t) - count: length + 1]; + argumentsCopy = of_malloc(length + 1, sizeof(of_char16_t)); memcpy(argumentsCopy, argumentsString.UTF16String, (length + 1) * 2); @try { if (!CreateProcessW(program.UTF16String, argumentsCopy, NULL, NULL, TRUE, @@ -207,11 +205,11 @@ [self of_wideEnvironmentForDictionary: environment], NULL, &si, &pi)) @throw [OFInitializationFailedException exceptionWithClass: self.class]; } @finally { - [self freeMemory: argumentsCopy]; + free(argumentsCopy); } } else { of_string_encoding_t encoding = [OFLocale encoding]; STARTUPINFO si;