From 16a9726838b50c6e5c6ebd26e4323c59ea636ef1 Mon Sep 17 00:00:00 2001 From: Andrew <16061801+brada4@users.noreply.github.com> Date: Fri, 15 Mar 2019 11:17:40 +0200 Subject: fix segv at start --- src/havege.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/havege.c b/src/havege.c index 43cac70..3c4508b 100644 --- a/src/havege.c +++ b/src/havege.c @@ -197,12 +197,12 @@ void havege_destroy( /* RETURN: none */ free(temp); } #ifdef ONLINE_TESTS_ENABLE - if (0 != (temp=hptr->testData)) { + 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; -- cgit v1.2.3