[PATCH 3/3] virDomainHostdevDefClear: Fix and shorten comment

Ján Tomko jtomko at redhat.com
Thu Mar 30 12:49:14 UTC 2023


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 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. */

s/freed/freed elswehere/ maybe?

>     if (!def->parentnet)
>         virDomainDeviceInfoFree(def->info);
>
>-- 
>2.39.2
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230330/65a4a2ab/attachment.sig>


More information about the libvir-list mailing list