]> xenbits.xensource.com Git - libvirt.git/commitdiff
virDomainHostdevDefClear: Fix and shorten comment
authorPeter Krempa <pkrempa@redhat.com>
Thu, 30 Mar 2023 12:28:06 +0000 (14:28 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:07 +0000 (09:19 +0200)
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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c

index 45c22b24ecf79059a1ceb4715007cd7302f937ca..70e4d52ee6bce277aed370627c665acf37ac9bc6 100644 (file)
@@ -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);