From: Pierre Schweitzer Date: Sat, 24 Oct 2015 10:09:44 +0000 (+0000) Subject: [SETUPAPI] X-Git-Tag: ReactOS-0.4.0~384 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=90198d9c569b0f57beee4227a7f6a6a0439ad536 [SETUPAPI] Fix a memory leak CID 716468 svn path=/trunk/; revision=69671 --- diff --git a/reactos/dll/win32/setupapi/query.c b/reactos/dll/win32/setupapi/query.c index fa9e2a76538..58c3d5b888e 100644 --- a/reactos/dll/win32/setupapi/query.c +++ b/reactos/dll/win32/setupapi/query.c @@ -356,7 +356,10 @@ static LPWSTR get_source_id( HINF hinf, PINFCONTEXT context, PCWSTR filename ) } if (!SetupDiGetActualSectionToInstallW(hinf, source_disks_names, Section, MAX_PATH, NULL, NULL)) + { + HeapFree( GetProcessHeap(), 0, source_id ); return NULL; + } if (!SetupFindFirstLineW( hinf, Section, source_id, context ) && !SetupFindFirstLineW( hinf, source_disks_names, source_id, context ))