mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Add assertions to crypto_dh_dup()
Without these, coverity is annoyed that aren't checking for NULL in bench.c CID 1293335 -- found by coverity.
This commit is contained in:
parent
a194385d56
commit
7816ba8f1a
1 changed files with 2 additions and 0 deletions
|
@ -1979,6 +1979,8 @@ crypto_dh_t *
|
|||
crypto_dh_dup(const crypto_dh_t *dh)
|
||||
{
|
||||
crypto_dh_t *dh_new = tor_malloc_zero(sizeof(crypto_dh_t));
|
||||
tor_assert(dh);
|
||||
tor_assert(dh->dh);
|
||||
dh_new->dh = dh->dh;
|
||||
DH_up_ref(dh->dh);
|
||||
return dh_new;
|
||||
|
|
Loading…
Add table
Reference in a new issue