From 440423dcdcfb4e7d290b5e8993e67b0070e1a314 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 17 Oct 2022 10:42:56 +0100 Subject: Close the GUsbDevice objects in gusbcmd --- tools/gusb-main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/gusb-main.c b/tools/gusb-main.c index 1f0826d..8037310 100644 --- a/tools/gusb-main.c +++ b/tools/gusb-main.c @@ -146,6 +146,10 @@ gusb_main_device_open(GUsbDevice *device) } g_print("product: %s\n", product); } + if (!g_usb_device_close(device, &error)) { + g_print("failed to close: %s\n", error->message); + return; + } } static void @@ -246,6 +250,7 @@ gusb_cmd_show_cb(GNode *node, gpointer data) g_string_append_printf(str, "%s - %s", vendor, product); g_print("%s\n", str->str); + g_usb_device_close(device, NULL); return FALSE; } -- cgit v1.2.1