mindtct: Fix memory leak in error path in find_neighbors()
libfprint/nbis/mindtct/ridges.c:284:13: warning: Potential leak of memory pointed to by 'nbr_list' free(nbr_sqr_dists); ^~~~
This commit is contained in:
parent
a53f07a8f6
commit
db607c4a6f
1 changed files with 1 additions and 0 deletions
|
@ -281,6 +281,7 @@ int find_neighbors(int **onbr_list, int *onnbrs, const int max_nbrs,
|
|||
if((ret = update_nbr_dists(nbr_list, nbr_sqr_dists, &nnbrs, max_nbrs,
|
||||
first, second, minutiae))){
|
||||
free(nbr_sqr_dists);
|
||||
free(nbr_list);
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue