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:
parent
8e08f567d9
commit
95d17e985d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user