Skip to content

Commit

Permalink
Fix potential crash (use-after-free) if UsbDk is not installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
matlo committed Jun 17, 2020
1 parent 326e2b4 commit 7fa9696
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/connectors/usb_con.c
Expand Up @@ -707,6 +707,8 @@ int usb_close(int usb_number) {
}

gusb_close(state->usb_device);

state->usb_device = NULL;
}

set_done();
Expand Down

0 comments on commit 7fa9696

Please sign in to comment.