[PATCH 3/3] virDomainHostdevDefClear: Fix and shorten comment
Peter Krempa
pkrempa at redhat.com
Thu Mar 30 12:38:15 UTC 2023
There's more stuff than device info to clear nowadays. Drop the
misleading comment. Shorten the comment saying that device info is freed
elsewhere when 'parentnet' is present.
Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
src/conf/domain_conf.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7ad4ff26ab..f8067be49a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2608,13 +2608,7 @@ virDomainHostdevDefClear(virDomainHostdevDef *def)
if (!def)
return;
- /* Free all resources in the hostdevdef. Currently the only
- * such resource is the virDomainDeviceInfo.
- */
-
- /* If there is a parentnet device object, it will handle freeing
- * def->info.
- */
+ /* Device info is freed with 'parentnet' if present. */
if (!def->parentnet)
virDomainDeviceInfoFree(def->info);
--
2.39.2
More information about the libvir-list
mailing list