Fix double-free on test failure

Found by coverity scan; CID 1398167.
This commit is contained in:
Nick Mathewson 2016-12-27 10:20:13 -05:00
parent 1fbb66fa77
commit 1a45398ffa

View File

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