summaryrefslogtreecommitdiffstats
path: root/src/usbmux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usbmux.c')
-rw-r--r--src/usbmux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usbmux.c b/src/usbmux.c
index d8e6b44..22ce588 100644
--- a/src/usbmux.c
+++ b/src/usbmux.c
@@ -38,7 +38,7 @@ static int clients = 0;
*
* @return A USBMux packet
*/
-usbmux_tcp_header *new_mux_packet(uint16 s_port, uint16 d_port)
+usbmux_tcp_header *new_mux_packet(uint16_t s_port, uint16_t d_port)
{
usbmux_tcp_header *conn = (usbmux_tcp_header *) malloc(sizeof(usbmux_tcp_header));
conn->type = htonl(6);
@@ -314,6 +314,7 @@ iphone_error_t iphone_mux_recv(iphone_umux_client_t client, char *data, uint32_t
} else {
memcpy(data, client->recv_buffer, client->r_len);
free(client->recv_buffer); // don't need to deal with anymore, but...
+ client->recv_buffer = NULL;
offset = client->r_len; // see #2b, above
client->r_len = 0;
}