diff options
author | Nikias Bassen | 2010-04-07 13:05:26 +0200 |
---|---|---|
committer | Hector Martin | 2010-04-08 15:19:18 +0200 |
commit | 34524ac4e8075f0fc330759fd42b4d4873f27019 (patch) | |
tree | 0b496c0db64763158e47a71cb02d59135b8b4dd7 | |
parent | 2f5316f8ae27736057eef34a72e4e087c0a24470 (diff) | |
download | usbmuxd-34524ac4e8075f0fc330759fd42b4d4873f27019.tar.gz usbmuxd-34524ac4e8075f0fc330759fd42b4d4873f27019.tar.bz2 |
libusbmuxd: close connection after enumerating devices
-rw-r--r-- | libusbmuxd/libusbmuxd.c | 3 |
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)); |