summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libusbmuxd/libusbmuxd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c
index 9349ef4..61d0b9d 100644
--- a/libusbmuxd/libusbmuxd.c
+++ b/libusbmuxd/libusbmuxd.c
@@ -398,6 +398,9 @@ int usbmuxd_get_device_list(usbmuxd_device_info_t **device_list)
}
}
+ // explicitly close connection
+ close(sfd);
+
// terminating zero record
newlist = (usbmuxd_device_info_t*) realloc(*device_list, sizeof(usbmuxd_device_info_t) * (dev_cnt + 1));
memset(newlist + dev_cnt, 0, sizeof(usbmuxd_device_info_t));