1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-01 20:05:19 +00:00

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 <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-03-30 14:28:06 +02:00
parent cab9e1884d
commit 1485f9c17d

View 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);