]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix double-free on test failure
authorNick Mathewson <nickm@torproject.org>
Tue, 27 Dec 2016 15:20:13 +0000 (10:20 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 27 Dec 2016 15:20:13 +0000 (10:20 -0500)
Found by coverity scan; CID 1398167.

src/test/test_hs_descriptor.c

index 360334201ee2796f29c3b6160374408c076d7282..02a71aa47321d8315a95a2f2420d7d95d62e7003 100644 (file)
@@ -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);