Commit 5d7468de authored by Fabio Utzig's avatar Fabio Utzig
Browse files

Fix segmentation error when running as unpriv user

parent 309be308
...@@ -198,6 +198,7 @@ main(int argc, char *argv[]) ...@@ -198,6 +198,7 @@ main(int argc, char *argv[])
if (rc != 0) if (rc != 0)
{ {
TRACE(ALWAYS, "Failed to open device. rc = %d\n", rc); TRACE(ALWAYS, "Failed to open device. rc = %d\n", rc);
goto out;
} }
// //
...@@ -363,6 +364,7 @@ found: ...@@ -363,6 +364,7 @@ found:
TRACE(1, "%s: libusb_close(phDev)\n", __FUNCTION__); TRACE(1, "%s: libusb_close(phDev)\n", __FUNCTION__);
libusb_close(phDev); libusb_close(phDev);
out:
TRACE(1, "%s: libusb_exit\n", __FUNCTION__); TRACE(1, "%s: libusb_exit\n", __FUNCTION__);
libusb_exit(pCtx); libusb_exit(pCtx);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment