This patch fixes a memory leak in hs_helper_build_hs_desc_impl() where if a test assertion would fail we would leak the storage that `desc` points to. See: Coverity CID 1437448
@@ -142,6 +142,9 @@ hs_helper_build_hs_desc_impl(unsigned int no_ip,
descp = desc;
done:
+ if (descp == NULL)
+ tor_free(desc);
+
return descp;
}