summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew <16061801+brada4@users.noreply.github.com>2019-03-15 10:17:40 +0100
committerAndrew <16061801+brada4@users.noreply.github.com>2019-03-15 10:17:40 +0100
commit16a9726838b50c6e5c6ebd26e4323c59ea636ef1 (patch)
treec256fd60f28af00bb0f09ef3ab2a51232438f75a /src
parentMerge pull request #10 from erahn/master (diff)
downloadhaveged-16a9726838b50c6e5c6ebd26e4323c59ea636ef1.tar.xz
haveged-16a9726838b50c6e5c6ebd26e4323c59ea636ef1.zip
fix segv at start
Diffstat (limited to 'src')
-rw-r--r--src/havege.c6
1 files 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;