summaryrefslogtreecommitdiffstats
path: root/libusbmuxd
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-04-07 13:05:26 +0200
committerGravatar Hector Martin2010-04-08 15:19:18 +0200
commit34524ac4e8075f0fc330759fd42b4d4873f27019 (patch)
tree0b496c0db64763158e47a71cb02d59135b8b4dd7 /libusbmuxd
parent2f5316f8ae27736057eef34a72e4e087c0a24470 (diff)
downloadusbmuxd-34524ac4e8075f0fc330759fd42b4d4873f27019.tar.gz
usbmuxd-34524ac4e8075f0fc330759fd42b4d4873f27019.tar.bz2
libusbmuxd: close connection after enumerating devices
Diffstat (limited to 'libusbmuxd')
-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));