wbemprox: Avoid a use after free (Coverity).
Signed-off-by: Sven Baars <sbaars@codeweavers.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
462edf6e2a
commit
ea60927fbd
|
@ -2116,9 +2116,9 @@ static WCHAR *get_diskdrive_serialnumber( WCHAR letter )
|
|||
heap_free( desc );
|
||||
break;
|
||||
}
|
||||
size = desc->Size;
|
||||
heap_free( desc );
|
||||
if (GetLastError() == ERROR_MORE_DATA) size = desc->Size;
|
||||
else break;
|
||||
if (GetLastError() != ERROR_MORE_DATA) break;
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
Loading…
Reference in New Issue