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:
Daniel Drake 2007-11-16 13:14:30 +00:00
parent 069b4a30eb
commit 3fa3c0daf7

View file

@ -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;