vfs301: Fix leak of USB transfer

vfs301_proto_peek_event would leak the returned transfer. Use a
g_autoptr to fix this.
This commit is contained in:
Benjamin Berg 2021-06-23 22:48:33 +02:00
parent 059ab65081
commit e2f199bb6a
1 changed files with 1 additions and 1 deletions

View File

@ -465,7 +465,7 @@ int
vfs301_proto_peek_event (FpDeviceVfs301 *dev)
{
g_autoptr(GError) error = NULL;
FpiUsbTransfer *transfer;
g_autoptr(FpiUsbTransfer) transfer = NULL;
const char no_event[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
const char got_event[] = {0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00};