aesx660: Fix memory leak in process_stripe_data()

libfprint/drivers/aesx660.c:292:10: warning: Potential leak of memory pointed to by 'stripe'
                return 0;
                       ^
This commit is contained in:
Bastien Nocera 2018-12-12 16:19:20 +01:00
parent cec307ce7f
commit 551616c3ab

View file

@ -288,10 +288,10 @@ static int process_stripe_data(fpi_ssm *ssm, struct fp_img_dev *dev, unsigned ch
aesdev->strips = g_slist_prepend(aesdev->strips, stripe); aesdev->strips = g_slist_prepend(aesdev->strips, stripe);
aesdev->strips_len++; aesdev->strips_len++;
return (data[AESX660_LAST_FRAME_OFFSET] & AESX660_LAST_FRAME_BIT); return (data[AESX660_LAST_FRAME_OFFSET] & AESX660_LAST_FRAME_BIT);
} else {
return 0;
} }
g_free(stripe);
return 0;
} }
static void capture_set_idle_cmd_cb(struct libusb_transfer *transfer) static void capture_set_idle_cmd_cb(struct libusb_transfer *transfer)