advpack: Avoid using sessions uninitialized (Coverity).

This commit is contained in:
Marcus Meissner 2013-01-07 22:17:36 +01:00 committed by Alexandre Julliard
parent 3173f17315
commit a6e4c094d0

View file

@ -708,6 +708,8 @@ HRESULT WINAPI ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags,
if (!hCabinet) if (!hCabinet)
return E_FAIL; return E_FAIL;
ZeroMemory(&session, sizeof(SESSION));
pExtract = (void *)GetProcAddress(hCabinet, "Extract"); pExtract = (void *)GetProcAddress(hCabinet, "Extract");
if (!pExtract) if (!pExtract)
{ {
@ -715,7 +717,6 @@ HRESULT WINAPI ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags,
goto done; goto done;
} }
ZeroMemory(&session, sizeof(SESSION));
lstrcpyA(session.Destination, ExpandDir); lstrcpyA(session.Destination, ExpandDir);
if (FileList) if (FileList)