virTypedParamsDeserialize: set nparams to 0 in case of an error

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Marc Hartmayer 2018-07-17 14:02:33 +02:00 committed by John Ferlan
parent 97be85dcc3
commit 5f02e28480

View File

@ -1467,6 +1467,7 @@ virTypedParamsDeserialize(virTypedParameterRemotePtr remote_params,
} else { } else {
virTypedParamsFree(*params, i); virTypedParamsFree(*params, i);
*params = NULL; *params = NULL;
*nparams = 0;
} }
} }
return rv; return rv;