From d3a401609e57c0e009078b5a8597c885fc6fd577 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 24 Oct 2015 10:14:21 +0000 Subject: [PATCH] =?utf8?q?[SETUPAPI]=20Partly=20backport=20Wine=20commit:?= =?utf8?q?=204d796458d0ed517d45adc57a1aedaf1c3bdde232=20"Avoid=20memory=20?= =?utf8?q?leaks=20(coverity)."=20by=20Andr=C3=A9=20Hentschel?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit CID 716469 svn path=/trunk/; revision=69672 --- reactos/dll/win32/setupapi/queue.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/setupapi/queue.c b/reactos/dll/win32/setupapi/queue.c index d10f1e0344c..684886870e0 100644 --- a/reactos/dll/win32/setupapi/queue.c +++ b/reactos/dll/win32/setupapi/queue.c @@ -1216,7 +1216,11 @@ BOOL WINAPI SetupInstallFileW( HINF hinf, PINFCONTEXT inf_context, PCWSTR source SetLastError( ERROR_NOT_ENOUGH_MEMORY ); return FALSE; } - if (!SetupGetStringFieldW( inf_context, 1, inf_source, len, NULL )) return FALSE; + if (!SetupGetStringFieldW( inf_context, 1, inf_source, len, NULL )) + { + HeapFree( GetProcessHeap(), 0, inf_source ); + return FALSE; + } source = inf_source; } else if (!source) -- 2.17.1