From: Paul Brossier Date: Thu, 6 Dec 2018 10:46:46 +0000 (+0100) Subject: [hist] fix potential memory leak X-Git-Tag: 0.4.9~122^2~2 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=fb0afbb02fe0fc7f0bc3f8e9c1c67bfa6b8e0419;p=aubio.git [hist] fix potential memory leak --- 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;