From: Peter Krempa Date: Thu, 30 Mar 2023 12:28:06 +0000 (+0200) Subject: virDomainHostdevDefClear: Fix and shorten comment X-Git-Tag: v9.3.0-rc1~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1485f9c17dac8973c7362fe6f1da54d74387652a;p=thirdparty%2Flibvirt.git virDomainHostdevDefClear: Fix and shorten comment 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 --- 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);