Commit ea60927f authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

wbemprox: Avoid a use after free (Coverity).

parent 462edf6e
...@@ -2116,9 +2116,9 @@ static WCHAR *get_diskdrive_serialnumber( WCHAR letter ) ...@@ -2116,9 +2116,9 @@ static WCHAR *get_diskdrive_serialnumber( WCHAR letter )
heap_free( desc ); heap_free( desc );
break; break;
} }
size = desc->Size;
heap_free( desc ); heap_free( desc );
if (GetLastError() == ERROR_MORE_DATA) size = desc->Size; if (GetLastError() != ERROR_MORE_DATA) break;
else break;
} }
done: done:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment