diff options
| author | 2013-07-13 01:39:38 +0200 | |
|---|---|---|
| committer | 2013-07-13 01:39:38 +0200 | |
| commit | 702a6faac5de45e2279c8a87a529b24a5b64d418 (patch) | |
| tree | f05d388b8aa78726dde43c485105611c6505e08f /libusbmuxd/libusbmuxd.c | |
| parent | f8065b26df76f9057e2d42db8bd1c68825f222c6 (diff) | |
| download | usbmuxd-702a6faac5de45e2279c8a87a529b24a5b64d418.tar.gz usbmuxd-702a6faac5de45e2279c8a87a529b24a5b64d418.tar.bz2 | |
libusbmuxd: fix memory leak in device_monitor_cleanup()
Diffstat (limited to 'libusbmuxd/libusbmuxd.c')
| -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) | |||
| 604 | 604 | ||
| 605 | static void device_monitor_cleanup(void* data) | 605 | static void device_monitor_cleanup(void* data) |
| 606 | { | 606 | { |
| 607 | FOREACH(usbmuxd_device_info_t *dev, &devices) { | ||
| 608 | collection_remove(&devices, dev); | ||
| 609 | free(dev); | ||
| 610 | } ENDFOREACH | ||
| 607 | collection_free(&devices); | 611 | collection_free(&devices); |
| 608 | 612 | ||
| 609 | close_socket(listenfd); | 613 | close_socket(listenfd); |
