]> granicus.if.org Git - haveged/commitdiff
take into account review by @nbraud
authorAndrew <16061801+brada4@users.noreply.github.com>
Fri, 16 Aug 2019 06:09:57 +0000 (09:09 +0300)
committerAndrew <16061801+brada4@users.noreply.github.com>
Fri, 16 Aug 2019 06:09:57 +0000 (09:09 +0300)
src/havege.c

index 3c4508b730717715d3447c62351b0a894ea811f2..d2a161ecd1b0929231081bc1aa74d0d4e42dfa6d 100644 (file)
@@ -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;