diff --git a/libfprint/drivers/vfs301_proto.c b/libfprint/drivers/vfs301_proto.c index 84e2318..2bf8bbd 100644 --- a/libfprint/drivers/vfs301_proto.c +++ b/libfprint/drivers/vfs301_proto.c @@ -67,7 +67,8 @@ static void usb_recv (FpDeviceVfs301 *dev, guint8 endpoint, int max_bytes, FpiUsbTransfer **out, GError **error) { GError *err = NULL; - FpiUsbTransfer *transfer; + + g_autoptr(FpiUsbTransfer) transfer = NULL; /* XXX: This function swallows any transfer errors, that is obviously * quite bad (it used to assert on no-error)! */ @@ -78,7 +79,6 @@ usb_recv (FpDeviceVfs301 *dev, guint8 endpoint, int max_bytes, FpiUsbTransfer ** fpi_usb_transfer_submit_sync (transfer, VFS301_DEFAULT_WAIT_TIMEOUT, &err); - #ifdef DEBUG usb_print_packet (0, err, transfer->buffer, transfer->actual_length); #endif @@ -97,7 +97,8 @@ static void usb_send (FpDeviceVfs301 *dev, const guint8 *data, gssize length, GError **error) { GError *err = NULL; - FpiUsbTransfer *transfer = NULL; + + g_autoptr(FpiUsbTransfer) transfer = NULL; /* XXX: This function swallows any transfer errors, that is obviously * quite bad (it used to assert on no-error)! */