From: Sebastien GODARD Date: Sun, 14 May 2017 16:52:06 +0000 (+0200) Subject: Fix CID 144609: Ressource leak X-Git-Tag: v11.5.7~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c553ec126fa32f126ad1526da8a6e733f2bfd7d;p=sysstat Fix CID 144609: Ressource leak In SREALLOC() macro: Old pointer was not freed when a realloc() had happened. Bug introduced by commit 569378e. Signed-off-by: Sebastien GODARD --- diff --git a/common.h b/common.h index aeacc9c..fb090ed 100644 --- a/common.h +++ b/common.h @@ -130,6 +130,7 @@ } \ else { \ memcpy(S, _p_, (SIZE)); \ + free(_p_); \ } \ } \ if (!S) { \