mindtct: Fix uninitialised value usage in count_minutia_ridges()

libfprint/nbis/mindtct/ridges.c:153:7: warning: 1st function call argument is an uninitialized value
      free(nbr_list);
      ^~~~~~~~~~~~~~
This commit is contained in:
Bastien Nocera 2018-12-12 17:24:45 +01:00
parent 0add0ca9b1
commit a218437cf4

View file

@ -148,9 +148,11 @@ int count_minutia_ridges(const int first, MINUTIAE *minutiae,
int i, ret, *nbr_list, *nbr_nridges, nnbrs;
/* Find up to the maximum number of qualifying neighbors. */
nbr_list = NULL;
if((ret = find_neighbors(&nbr_list, &nnbrs, lfsparms->max_nbrs,
first, minutiae))){
free(nbr_list);
if (nbr_list != NULL)
free(nbr_list);
return(ret);
}