From c3e996b96ccf2eeec35ec0913ed15d528e58bb06 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 13 Dec 2018 11:27:00 +0100 Subject: [PATCH] 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, ^~~~~~~ --- libfprint/nbis/mindtct/shape.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libfprint/nbis/mindtct/shape.c b/libfprint/nbis/mindtct/shape.c index f189a99..5f9e7bc 100644 --- a/libfprint/nbis/mindtct/shape.c +++ b/libfprint/nbis/mindtct/shape.c @@ -260,6 +260,7 @@ int shape_from_contour(SHAPE **oshape, const int *contour_x, if(row->npts >= row->alloc){ /* This should never happen becuase we have allocated */ /* based on shape bounding limits. */ + free(shape); fprintf(stderr, "ERROR : shape_from_contour : row overflow\n"); return(-260);