Jinjinov / Usb.Events

Subscribe to the Inserted and Removed events to be notified when a USB drive is plugged in or unplugged, or when a USB device is connected or disconnected. Usb.Events is a .NET Standard 2.0 library and uses WMI on Windows, libudev on Linux and IOKit on macOS.
MIT License
95 stars 23 forks source link

Memory Leak #6

Closed maskimthedog closed 3 years ago

maskimthedog commented 3 years ago

On line 245 of UsbEventWatcher.Linux.c there appears to be a memory leak. 'dev' is never unreferenced in GetLinuxMountPoint(). I noticed allocated memory ticking up in my test application. I looked over the code and noticed the aforementioned.

Jinjinov commented 3 years ago

Fixed with 3d5e62750dae6315ffa5ca661fd958287bf70a7b