diff --git a/dll/win32/setupapi/queue.c b/dll/win32/setupapi/queue.c index 7c5a9e1abf4..ae5e7e72e17 100644 --- a/dll/win32/setupapi/queue.c +++ b/dll/win32/setupapi/queue.c @@ -775,7 +775,7 @@ BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ queue, PCWSTR src_root, HINF hinf, INFCONTEXT security_context; #endif INFCONTEXT context; - WCHAR dest[MAX_PATH], src[MAX_PATH]; + WCHAR dest[MAX_PATH], src[MAX_PATH], *dest_dir; INT flags; BOOL ret; @@ -828,19 +828,20 @@ BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ queue, PCWSTR src_root, HINF hinf, if (!hlist) hlist = hinf; if (!hinf) hinf = hlist; if (!SetupFindFirstLineW( hlist, section, NULL, &context )) goto done; - if (!(params.TargetDirectory = get_destination_dir( hinf, section ))) goto done; + if (!(params.TargetDirectory = dest_dir = get_destination_dir( hinf, section ))) goto done; do { if (!SetupGetStringFieldW( &context, 1, dest, sizeof(dest)/sizeof(WCHAR), NULL )) - goto done; + goto end; if (!SetupGetStringFieldW( &context, 2, src, sizeof(src)/sizeof(WCHAR), NULL )) *src = 0; if (!SetupGetIntField( &context, 4, &flags )) flags = 0; /* FIXME */ params.SourceFilename = *src ? src : NULL; - if (!SetupQueueCopyIndirectW( ¶ms )) goto done; + if (!SetupQueueCopyIndirectW( ¶ms )) goto end; } while (SetupFindNextLine( &context, &context )); ret = TRUE; - +end: + HeapFree(GetProcessHeap(), 0, dest_dir); done: #ifdef __REACTOS__ if (security_descriptor) diff --git a/sdk/tools/winesync/setupapi.cfg b/sdk/tools/winesync/setupapi.cfg index c472c21ca33..5b0fdaf8cde 100644 --- a/sdk/tools/winesync/setupapi.cfg +++ b/sdk/tools/winesync/setupapi.cfg @@ -3,4 +3,4 @@ files: dlls/setupapi/queue.c: dll/win32/setupapi/queue.c dlls/setupapi/stringtable.c: dll/win32/setupapi/stringtable.c tags: - wine: ffae0123ac46ba6dfac74d7c84422073fd53b580 + wine: 63231be8044441218fb82899e748900e1ace3d0d