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:
parent
0add0ca9b1
commit
a218437cf4
1 changed files with 3 additions and 1 deletions
|
@ -148,9 +148,11 @@ int count_minutia_ridges(const int first, MINUTIAE *minutiae,
|
||||||
int i, ret, *nbr_list, *nbr_nridges, nnbrs;
|
int i, ret, *nbr_list, *nbr_nridges, nnbrs;
|
||||||
|
|
||||||
/* Find up to the maximum number of qualifying neighbors. */
|
/* Find up to the maximum number of qualifying neighbors. */
|
||||||
|
nbr_list = NULL;
|
||||||
if((ret = find_neighbors(&nbr_list, &nnbrs, lfsparms->max_nbrs,
|
if((ret = find_neighbors(&nbr_list, &nnbrs, lfsparms->max_nbrs,
|
||||||
first, minutiae))){
|
first, minutiae))){
|
||||||
free(nbr_list);
|
if (nbr_list != NULL)
|
||||||
|
free(nbr_list);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue