1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-02 10:04:33 +00:00

NULLing handle on destroy

This commit is contained in:
nelisky 2012-03-16 19:17:24 +00:00
parent 8e08f567d9
commit 95d17e985d

View File

@ -352,6 +352,7 @@ int libztex_prepare_device (struct libusb_device *dev, struct libztex_device** z
void libztex_destroy_device (struct libztex_device* ztex) {
if (ztex->hndl != NULL) {
libusb_close(ztex->hndl);
ztex->hndl = NULL;
}
if (ztex->bitFileName != NULL) {
free(ztex->bitFileName);