Browse Source

Fix double-free on test failure

Found by coverity scan; CID 1398167.
Nick Mathewson 3 years ago
parent
commit
1a45398ffa
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/test/test_hs_descriptor.c

+ 1 - 0
src/test/test_hs_descriptor.c

@@ -689,6 +689,7 @@ test_decode_intro_point(void *arg)
   /* Try to decode a junk string. */
   {
     hs_descriptor_free(desc);
+    desc = NULL;
     ret = ed25519_keypair_generate(&signing_kp, 0);
     tt_int_op(ret, ==, 0);
     desc = helper_build_hs_desc(0, &signing_kp.pubkey);