Initialize enrolled image pointer to NULL
Currently this is a dangling pointer if the image capture fails, and then we try to standardize an invalid pointer --> crash
This commit is contained in:
parent
069b4a30eb
commit
3fa3c0daf7
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ err:
|
|||
int img_dev_enroll(struct fp_dev *dev, gboolean initial, int stage,
|
||||
struct fp_print_data **ret, struct fp_img **_img)
|
||||
{
|
||||
struct fp_img *img;
|
||||
struct fp_img *img = NULL;
|
||||
struct fp_img_dev *imgdev = dev->priv;
|
||||
struct fp_print_data *print;
|
||||
int r;
|
||||
|
|
Loading…
Reference in a new issue