diff options
author | Frédéric Danis <frederic.danis@collabora.com> | 2023-01-11 09:52:41 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2023-01-11 09:09:20 +0000 |
commit | 600c703532c9019cb2e67878610f169b17e7577b (patch) | |
tree | ad90efa864f6f62159e7f371c6dcc29cd6065fc2 | |
parent | 0ce28191bacf54c525a4dffca92c50fa154e7233 (diff) | |
download | gusb-600c703532c9019cb2e67878610f169b17e7577b.tar.gz |
Fix g_usb_interface_finalize without endpoints
-rw-r--r-- | gusb/gusb-interface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gusb/gusb-interface.c b/gusb/gusb-interface.c index e08409c..414b1fc 100644 --- a/gusb/gusb-interface.c +++ b/gusb/gusb-interface.c @@ -40,7 +40,8 @@ g_usb_interface_finalize(GObject *object) GUsbInterface *self = G_USB_INTERFACE(object); g_bytes_unref(self->extra); - g_ptr_array_unref(self->endpoints); + if (self->endpoints != NULL) + g_ptr_array_unref(self->endpoints); G_OBJECT_CLASS(g_usb_interface_parent_class)->finalize(object); } |