diff options
Diffstat (limited to 'src/device.c')
| -rw-r--r-- | src/device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/device.c b/src/device.c index 3edaea0..0cd9af4 100644 --- a/src/device.c +++ b/src/device.c | |||
| @@ -344,10 +344,8 @@ static void connection_teardown(struct mux_connection *conn) | |||
| 344 | client_close(conn->client); | 344 | client_close(conn->client); |
| 345 | } | 345 | } |
| 346 | } | 346 | } |
| 347 | if(conn->ib_buf) | 347 | free(conn->ib_buf); |
| 348 | free(conn->ib_buf); | 348 | free(conn->ob_buf); |
| 349 | if(conn->ob_buf) | ||
| 350 | free(conn->ob_buf); | ||
| 351 | collection_remove(&conn->dev->connections, conn); | 349 | collection_remove(&conn->dev->connections, conn); |
| 352 | free(conn); | 350 | free(conn); |
| 353 | } | 351 | } |
| @@ -394,6 +392,8 @@ int device_start_connect(int device_id, uint16_t dport, struct mux_client *clien | |||
| 394 | res = send_tcp(conn, TH_SYN, NULL, 0); | 392 | res = send_tcp(conn, TH_SYN, NULL, 0); |
| 395 | if(res < 0) { | 393 | if(res < 0) { |
| 396 | usbmuxd_log(LL_ERROR, "Error sending TCP SYN to device %d (%d->%d)", dev->id, sport, dport); | 394 | usbmuxd_log(LL_ERROR, "Error sending TCP SYN to device %d (%d->%d)", dev->id, sport, dport); |
| 395 | free(conn->ib_buf); | ||
| 396 | free(conn->ob_buf); | ||
| 397 | free(conn); | 397 | free(conn); |
| 398 | return -RESULT_CONNREFUSED; //bleh | 398 | return -RESULT_CONNREFUSED; //bleh |
| 399 | } | 399 | } |
