From fb0afbb02fe0fc7f0bc3f8e9c1c67bfa6b8e0419 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 6 Dec 2018 11:46:46 +0100 Subject: [PATCH] [hist] fix potential memory leak --- src/utils/hist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/hist.c b/src/utils/hist.c index e0e24864..2dcc4432 100644 --- a/src/utils/hist.c +++ b/src/utils/hist.c @@ -44,6 +44,7 @@ aubio_hist_t * new_aubio_hist (smpl_t flow, smpl_t fhig, uint_t nelems){ smpl_t accum = step; uint_t i; if ((sint_t)nelems <= 0) { + AUBIO_FREE(s); return NULL; } s->nelems = nelems; -- 2.11.0