mirror of https://github.com/nirenjan/libx52.git
Clear the structure memory on exiting libx52
parent
cc8d6e9344
commit
0b6bc8f074
|
@ -125,6 +125,10 @@ void libx52_exit(libx52_device *dev)
|
|||
{
|
||||
libusb_close(dev->hdl);
|
||||
libusb_exit(dev->ctx);
|
||||
|
||||
/* Clear the memory to prevent reuse */
|
||||
memset(dev, 0, sizeof(*dev));
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue