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:
Bastien Nocera 2018-12-13 11:59:24 +01:00
parent a53f07a8f6
commit db607c4a6f

View file

@ -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, if((ret = update_nbr_dists(nbr_list, nbr_sqr_dists, &nnbrs, max_nbrs,
first, second, minutiae))){ first, second, minutiae))){
free(nbr_sqr_dists); free(nbr_sqr_dists);
free(nbr_list);
return(ret); return(ret);
} }
} }