[libvirt PATCH] conf: Avoid double free in virDomainEventTunableNew callers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/conf/domain_event.c | 1 +
 1 file changed, 1 insertion(+)

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;
 }
 
-- 
2.38.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux