summary refs log tree commit diff stats
path: root/hw/vfio/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/vfio/device.c')
-rw-r--r--hw/vfio/device.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/vfio/device.c b/hw/vfio/device.c
index 3cd365fb8b..97eddd04f5 100644
--- a/hw/vfio/device.c
+++ b/hw/vfio/device.c
@@ -333,6 +333,11 @@ bool vfio_device_get_name(VFIODevice *vbasedev, Error **errp)
     return true;
 }
 
+void vfio_device_free_name(VFIODevice *vbasedev)
+{
+    g_clear_pointer(&vbasedev->name, g_free);
+}
+
 void vfio_device_set_fd(VFIODevice *vbasedev, const char *str, Error **errp)
 {
     ERRP_GUARD();