Skip to content

Commit

Permalink
Fix leaking an allocated bundle in case no matching reader was found
Browse files Browse the repository at this point in the history
  • Loading branch information
nioncode authored and LudovicRousseau committed Aug 27, 2018
1 parent 06ae975 commit 452fb5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ccid_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,10 @@ status_t OpenUSBByName(unsigned int reader_index, /*@null@*/ char *device)
goto again_libusb;
}
#endif

/* free bundle list */
bundleRelease(&plist);

/* failed */
close_libusb_if_needed();

Expand Down

0 comments on commit 452fb5a

Please sign in to comment.