diff options
author | Nikias Bassen | 2009-04-25 15:14:39 +0200 |
---|---|---|
committer | Nikias Bassen | 2009-04-25 15:14:39 +0200 |
commit | cae80628faeeb19a88a28d7fb058e74f8b2743ed (patch) | |
tree | 99436d996ede094fa942019d9763eb22bcb69b03 | |
parent | ce4b528e203a67cbc3c8c2950b237b8fd1a41bed (diff) | |
download | usbmuxd-cae80628faeeb19a88a28d7fb058e74f8b2743ed.tar.gz usbmuxd-cae80628faeeb19a88a28d7fb058e74f8b2743ed.tar.bz2 |
removed unused buffer variable from usbmux_device_t
-rw-r--r-- | usbmux.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -56,7 +56,6 @@ typedef struct { } receivebuf_t; struct usbmux_device_int { - char *buffer; struct usb_dev_handle *usbdev; struct usb_device *__device; receivebuf_t usbReceive; @@ -312,7 +311,6 @@ int usbmux_get_specific_device(int bus_n, int dev_n, // Initialize the struct newdevice->usbdev = NULL; newdevice->__device = NULL; - newdevice->buffer = NULL; // don't forget these: newdevice->usbReceive.buffer = NULL; @@ -422,9 +420,6 @@ int usbmux_free_device(usbmux_device_t device) ret = bytes; } - if (device->buffer) { - free(device->buffer); - } if (device->usbReceive.buffer) { free(device->usbReceive.buffer); } @@ -624,10 +619,14 @@ static void delete_connection(usbmux_client_t connection) // free up this connection pthread_mutex_lock(&connection->mutex); - if (connection->recv_buffer) + if (connection->recv_buffer) { free(connection->recv_buffer); - if (connection->header) + connection->recv_buffer = NULL; + } + if (connection->header) { free(connection->header); + connection->header = NULL; + } connection->r_len = 0; pthread_mutex_unlock(&connection->mutex); pthread_mutex_destroy(&connection->mutex); |