X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fecdh.c;h=4dd399f8c8f42464343625cbb25768e05cf06a02;hb=cff27a258f3b3a97b5d2e309c264eceea41dff3a;hp=843242095f755177882c9966fae85a5c9f7daf3b;hpb=03ac48ea19914e4162f17a2fb0f742b99ae32499;p=tinc diff --git a/src/openssl/ecdh.c b/src/openssl/ecdh.c index 84324209..4dd399f8 100644 --- a/src/openssl/ecdh.c +++ b/src/openssl/ecdh.c @@ -75,3 +75,10 @@ bool ecdh_compute_shared(ecdh_t *ecdh, const void *pubkey, void *shared) { return true; } + +void ecdh_free(ecdh_t *ecdh) { + if(*ecdh) { + EC_KEY_free(*ecdh); + *ecdh = NULL; + } +}