From: Andrew <16061801+brada4@users.noreply.github.com> Date: Fri, 16 Aug 2019 06:09:57 +0000 (+0300) Subject: take into account review by @nbraud X-Git-Tag: v1.9.5-alpha~4^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e16369d13d6d39311e080ec7f0c41722f7ca10b0;p=haveged take into account review by @nbraud --- diff --git a/src/havege.c b/src/havege.c index 3c4508b..d2a161e 100644 --- a/src/havege.c +++ b/src/havege.c @@ -200,9 +200,9 @@ void havege_destroy( /* RETURN: none */ else if (0 != (temp=hptr->testData)) { double *g = ((procShared *)temp)->G; hptr->testData = 0; + if (0 != g) + free(g); } - if (0 != g) - free(g); #endif if (0 != (htemp=hptr->collector)) { hptr->collector = 0;