diff options
author | 2014-06-24 05:39:29 +0000 | |
---|---|---|
committer | 2014-06-24 05:39:29 +0000 | |
commit | 9873957aca59e6b469f159941ad4c605bd1d2b63 (patch) | |
tree | a16689cbd7107d03889b962a2369dbd6f86c4ce4 | |
parent | remove the noaccesstime synonym for noatime which was previously added for BSD/OS compatibility. (diff) | |
download | wireguard-openbsd-9873957aca59e6b469f159941ad4c605bd1d2b63.tar.xz wireguard-openbsd-9873957aca59e6b469f159941ad4c605bd1d2b63.zip |
Fix memory leak.
Thanks to Brenk Cook.
OK from miod@
-rw-r--r-- | lib/libssl/src/apps/ecparam.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/src/apps/ecparam.c b/lib/libssl/src/apps/ecparam.c index bed801a6d8d..e00cb20539e 100644 --- a/lib/libssl/src/apps/ecparam.c +++ b/lib/libssl/src/apps/ecparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecparam.c,v 1.20 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: ecparam.c,v 1.21 2014/06/24 05:39:29 logan Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -544,8 +544,10 @@ bad: if (eckey == NULL) goto end; - if (EC_KEY_set_group(eckey, group) == 0) + if (EC_KEY_set_group(eckey, group) == 0) { + EC_KEY_free(eckey); goto end; + } if (!EC_KEY_generate_key(eckey)) { EC_KEY_free(eckey); |