Fix memory leak in DH key generation (#2481)
Fix memory leak in DH key generation (#2481)

* Refs 13365. Fix #2332.

Signed-off-by: Miguel Company <397e72ca524b8ec9f06ef35fe0c74285a78d6afb@eprosima.com>

* Refs 13365. Free DH when it cannot be assigned.

Signed-off-by: Miguel Company <397e72ca524b8ec9f06ef35fe0c74285a78d6afb@eprosima.com>

Co-authored-by: Miguel Company <397e72ca524b8ec9f06ef35fe0c74285a78d6afb@eprosima.com>
eProsima/Fast-DDS,eProsima/Fast-DDS,eProsima/Fast-DDS,eProsima/Fast-DDS,eProsima/Fast-DDS