]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fx2lafw/api.c
Ensure device is closed before usb_get_port_path()
[libsigrok.git] / src / hardware / fx2lafw / api.c
index adae8045ae8233ab4f8c8d766c6c14cf0ba0d7b4..abb867884ed0ba9ae8e10acf242487f829f45c41 100644 (file)
@@ -263,10 +263,10 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                        continue;
                }
 
-               usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
-
                libusb_close(hdl);
 
+               usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
+
                prof = NULL;
                for (j = 0; supported_fx2[j].vid; j++) {
                        if (des.idVendor == supported_fx2[j].vid &&