mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user