conf: Avoid double free in virDomainEventTunableNew callers

virDomainEventTunableNew is supposed to consume and free @params, but it
failed to always set @params to NULL to make sure the caller doesn't try
to free the same memory again.

Fixes: d95c79fbd00dc597b607b130d95c258b6cf31690
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2022-11-02 15:10:25 +01:00
parent ce7a33b48f
commit 6eb02a0086

View File

@ -1515,6 +1515,7 @@ virDomainEventTunableNew(int id,
error:
virTypedParamsFree(*params, nparams);
*params = NULL;
return NULL;
}