From 1a11ca877f4046f59e4b18b53748fe8c36c4111f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 24 Jul 2006 12:14:26 +0000 Subject: [PATCH] Don't try to free twice a pointer. svn path=/trunk/; revision=23264 --- reactos/dll/win32/setupapi/driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/setupapi/driver.c b/reactos/dll/win32/setupapi/driver.c index 609e774dee6..571a774f903 100644 --- a/reactos/dll/win32/setupapi/driver.c +++ b/reactos/dll/win32/setupapi/driver.c @@ -307,7 +307,7 @@ GetVersionInformationFromInfFile( &RequiredSize); if (Result) { - /* We know know the needed buffer size */ + /* We know the needed buffer size */ ProviderName = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); if (!ProviderName) { @@ -405,7 +405,10 @@ GetVersionInformationFromInfFile( cleanup: if (!ret) + { HeapFree(GetProcessHeap(), 0, ProviderName); + *pProviderName = NULL; + } HeapFree(GetProcessHeap(), 0, DriverVer); return ret;