summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-08-05 00:05:27 +0200
committerGravatar Nikias Bassen2020-08-05 00:05:27 +0200
commit63d1164e736d7419198d1b737d10a9aae85bef98 (patch)
tree7d27d9fe8dfd9f34f3454e55e48d598b2c732edb /src
parentb24f86e57498239bf38b958f51e8ca0650a17a49 (diff)
downloadusbmuxd-63d1164e736d7419198d1b737d10a9aae85bef98.tar.gz
usbmuxd-63d1164e736d7419198d1b737d10a9aae85bef98.tar.bz2
device: Prevent calling client_close() from connection_teardown() when called from device_abort_connect()
... which itself is only called from within client_close()
Diffstat (limited to 'src')
-rw-r--r--src/device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 0b72c62..aac40b1 100644
--- a/src/device.c
+++ b/src/device.c
@@ -549,6 +549,7 @@ void device_abort_connect(int device_id, struct mux_client *client)
{
struct mux_connection *conn = get_mux_connection(device_id, client);
if (conn) {
+ conn->client = NULL;
connection_teardown(conn);
} else {
usbmuxd_log(LL_WARNING, "Attempted to abort for nonexistent connection for device %d", device_id);