Signed-off-by: Karim Taha <kariem.taha2.7@xxxxxxxxx> --- src/node_device/node_device_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index ce42b1ca63..d99b48138e 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -439,7 +439,7 @@ nodeDeviceListCaps(virNodeDevicePtr device, { virNodeDeviceObj *obj; virNodeDeviceDef *def; - virNodeDevCapType *list = NULL; + g_autofree virNodeDevCapType *list = NULL; int ncaps = 0; int ret = -1; size_t i = 0; @@ -472,8 +472,6 @@ nodeDeviceListCaps(virNodeDevicePtr device, for (j = 0; j < i; j++) VIR_FREE(names[j]); } - - VIR_FREE(list); return ret; } -- 2.44.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx