On a Thursday in 2023, Peter Krempa wrote:
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@xxxxxxxxxx> --- 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. */
s/freed/freed elswehere/ maybe?
if (!def->parentnet) virDomainDeviceInfoFree(def->info); -- 2.39.2
Attachment:
signature.asc
Description: PGP signature