From: Jiri Denemark Date: Wed, 2 Nov 2022 14:10:25 +0000 (+0100) Subject: conf: Avoid double free in virDomainEventTunableNew callers X-Git-Tag: v8.10.0-rc1~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eb02a0086d6c5a52ac74ae5dad95bee2cdf0cd5;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Ján Tomko --- diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index 97d58c2521..7e9bd08381 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -1515,6 +1515,7 @@ virDomainEventTunableNew(int id, error: virTypedParamsFree(*params, nparams); + *params = NULL; return NULL; }