mindtct: Fix memory leak in error path in shape_from_contour()
libfprint/nbis/mindtct/shape.c:263:13: warning: Potential leak of memory pointed to by 'shape' fprintf(stderr, ^~~~~~~
This commit is contained in:
parent
a218437cf4
commit
c3e996b96c
1 changed files with 1 additions and 0 deletions
|
@ -260,6 +260,7 @@ int shape_from_contour(SHAPE **oshape, const int *contour_x,
|
||||||
if(row->npts >= row->alloc){
|
if(row->npts >= row->alloc){
|
||||||
/* This should never happen becuase we have allocated */
|
/* This should never happen becuase we have allocated */
|
||||||
/* based on shape bounding limits. */
|
/* based on shape bounding limits. */
|
||||||
|
free(shape);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"ERROR : shape_from_contour : row overflow\n");
|
"ERROR : shape_from_contour : row overflow\n");
|
||||||
return(-260);
|
return(-260);
|
||||||
|
|
Loading…
Reference in a new issue