mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Fix potential memory leak in hs_helper_build_hs_desc_impl().
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
This commit is contained in:
parent
8c8941eb29
commit
dc2384da30
@ -142,6 +142,9 @@ hs_helper_build_hs_desc_impl(unsigned int no_ip,
|
|||||||
|
|
||||||
descp = desc;
|
descp = desc;
|
||||||
done:
|
done:
|
||||||
|
if (descp == NULL)
|
||||||
|
tor_free(desc);
|
||||||
|
|
||||||
return descp;
|
return descp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user