mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: g_malloc never fails
Or rather, it never returns errors and aborts instead if memory cannot be allocated, so remove code that handled failures. https://bugs.freedesktop.org/show_bug.cgi?id=57869
This commit is contained in:
committed by
Bastien Nocera
parent
1acd647b29
commit
6d65bfcf80
@@ -47,16 +47,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
|
||||
}
|
||||
|
||||
dev->priv = aesdev = g_malloc0(sizeof(struct aesX660_dev));
|
||||
if (!aesdev)
|
||||
return -ENOMEM;
|
||||
|
||||
aesdev->buffer = g_malloc0(AES2660_FRAME_SIZE + AESX660_HEADER_SIZE);
|
||||
if (!aesdev->buffer) {
|
||||
g_free(aesdev);
|
||||
dev->priv = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* No scaling for AES2660 */
|
||||
aesdev->h_scale_factor = 1;
|
||||
aesdev->init_seqs[0] = aes2660_init_1;
|
||||
|
||||
Reference in New Issue
Block a user