From e2f199bb6acf6d0abcde023e3025dfbfb6fc7192 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Wed, 23 Jun 2021 22:48:33 +0200 Subject: [PATCH] vfs301: Fix leak of USB transfer vfs301_proto_peek_event would leak the returned transfer. Use a g_autoptr to fix this. --- libfprint/drivers/vfs301_proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfprint/drivers/vfs301_proto.c b/libfprint/drivers/vfs301_proto.c index f6106b60..4431efd6 100644 --- a/libfprint/drivers/vfs301_proto.c +++ b/libfprint/drivers/vfs301_proto.c @@ -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};