mirror of
git://source.winehq.org/git/wine.git
synced 2024-08-31 12:04:35 +00:00
wmiutils: Always zero path->namespaces in parse_text (Coverity).
When the malloc for len_namespaces should fail namespaces would be uninitialized and passed to free.
This commit is contained in:
parent
83bcb752a2
commit
ed18b66ceb
|
@ -437,7 +437,7 @@ static HRESULT parse_text( struct path *path, ULONG mode, const WCHAR *text )
|
|||
}
|
||||
if (path->num_namespaces)
|
||||
{
|
||||
if (!(path->namespaces = malloc( path->num_namespaces * sizeof(WCHAR *) ))) goto done;
|
||||
if (!(path->namespaces = calloc( path->num_namespaces, sizeof(WCHAR *) ))) goto done;
|
||||
if (!(path->len_namespaces = malloc( path->num_namespaces * sizeof(int) ))) goto done;
|
||||
|
||||
i = 0;
|
||||
|
|
Loading…
Reference in a new issue