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

Re: [libvirt] [PATCH 1/3] qemuDomainGetResctrlMonData: Don't leak @caps



On Tue, Aug 06, 2019 at 01:47:44PM +0200, Michal Privoznik wrote:
The capabilities object must be unrefed when no longer needed.
use VIR_AUTOUNREF() for that.

s/use/Use/
or
s/needed./needed;/


Signed-off-by: Michal Privoznik <mprivozn redhat com>
---
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 3c5ec848ba..d5a8beb134 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20737,7 +20737,7 @@ qemuDomainGetResctrlMonData(virQEMUDriverPtr driver,
    virDomainResctrlDefPtr resctrl = NULL;
    virQEMUResctrlMonDataPtr res = NULL;
    char **features = NULL;
-    virCapsPtr caps = NULL;
+    VIR_AUTOUNREF(virCapsPtr) caps = NULL;
    size_t i = 0;
    size_t j = 0;

--
2.21.0

--
libvir-list mailing list
libvir-list redhat com
https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: PGP signature


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