From 1485f9c17dac8973c7362fe6f1da54d74387652a Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 30 Mar 2023 14:28:06 +0200 Subject: [PATCH] virDomainHostdevDefClear: Fix and shorten comment MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- 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 45c22b24ec..70e4d52ee6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2606,13 +2606,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 elsewhere with 'parentnet' if present. */ if (!def->parentnet) virDomainDeviceInfoFree(def->info); -- 2.47.2