diff options
author | Nikias Bassen | 2013-07-13 01:39:38 +0200 |
---|---|---|
committer | Nikias Bassen | 2013-07-13 01:39:38 +0200 |
commit | 702a6faac5de45e2279c8a87a529b24a5b64d418 (patch) | |
tree | f05d388b8aa78726dde43c485105611c6505e08f | |
parent | f8065b26df76f9057e2d42db8bd1c68825f222c6 (diff) | |
download | usbmuxd-702a6faac5de45e2279c8a87a529b24a5b64d418.tar.gz usbmuxd-702a6faac5de45e2279c8a87a529b24a5b64d418.tar.bz2 |
libusbmuxd: fix memory leak in device_monitor_cleanup()
-rw-r--r-- | libusbmuxd/libusbmuxd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c index 31d1c7c..b4afe8e 100644 --- a/libusbmuxd/libusbmuxd.c +++ b/libusbmuxd/libusbmuxd.c @@ -604,6 +604,10 @@ int get_next_event(int sfd, usbmuxd_event_cb_t callback, void *user_data) static void device_monitor_cleanup(void* data) { + FOREACH(usbmuxd_device_info_t *dev, &devices) { + collection_remove(&devices, dev); + free(dev); + } ENDFOREACH collection_free(&devices); close_socket(listenfd); |