aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_helper_eddsa.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-21 13:30:07 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-21 13:30:07 +0100
commit9b8abc1b011e65d29b87e21625a55ba0ed652e87 (patch)
tree7118f7e8401265efe7dfafbdb49741b08894ff7e /src/util/test_helper_eddsa.c
parent5159badd0e999fbcd610e3db22b5415571d9fa54 (diff)
-fix use after free
Diffstat (limited to 'src/util/test_helper_eddsa.c')
-rw-r--r--src/util/test_helper_eddsa.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/test_helper_eddsa.c b/src/util/test_helper_eddsa.c
index 7ce457d8d..9b821ae25 100644
--- a/src/util/test_helper_eddsa.c
+++ b/src/util/test_helper_eddsa.c
@@ -220,6 +220,7 @@ test_revocation (struct TALER_CRYPTO_ExchangeSignHelper *esh)
"\nFAILED: timeout trying to revoke key %u\n",
j);
TALER_CRYPTO_helper_esign_disconnect (esh);
+ esh = NULL;
return 2;
}
fprintf (stderr, "\n");
@@ -453,7 +454,11 @@ run_test (void)
if (0 == ret)
ret = perf_signing (esh,
"sequential");
- TALER_CRYPTO_helper_esign_disconnect (esh);
+ if (NULL != esh)
+ {
+ TALER_CRYPTO_helper_esign_disconnect (esh);
+ esh = NULL;
+ }
if (0 == ret)
ret = par_signing (cfg);
/* clean up our state */