[spice-gtk 4/5] usb-redir: delete usb-backend context on initialization error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The delete in error flow was missing.

Signed-off-by: Yuri Benditovich <yuri.benditovich@xxxxxxxxxx>
---
 src/usb-device-manager.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
index 857d057..7105ff1 100644
--- a/src/usb-device-manager.c
+++ b/src/usb-device-manager.c
@@ -259,6 +259,7 @@ static gboolean spice_usb_device_manager_initable_init(GInitable  *initable,
     if (!spice_usb_backend_register_hotplug(priv->context, self,
                                             spice_usb_device_manager_hotplug_cb,
                                             err)) {
+        spice_usb_backend_delete(priv->context);
         return FALSE;
     }
 #ifndef G_OS_WIN32
-- 
2.17.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]