From: Pierre Schweitzer Date: Sat, 24 Oct 2015 10:14:21 +0000 (+0000) Subject: [SETUPAPI] X-Git-Tag: ReactOS-0.4.0~383 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=d3a401609e57c0e009078b5a8597c885fc6fd577;ds=sidebyside [SETUPAPI] Partly backport Wine commit: 4d796458d0ed517d45adc57a1aedaf1c3bdde232 "Avoid memory leaks (coverity)." by André Hentschel CID 716469 svn path=/trunk/; revision=69672 --- 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)