diff options
| author | doug <> | 2015-03-20 03:02:51 +0000 |
|---|---|---|
| committer | doug <> | 2015-03-20 03:02:51 +0000 |
| commit | ab347d38e6b377abe52b35915b4a6966cd77cf84 (patch) | |
| tree | 4a0b0e0d288ccdc4a179f5b1be9bacf2000559ad /src/lib/libc | |
| parent | 760e28c61aadee16c8f4428f0dc588c2c290db12 (diff) | |
| download | openbsd-ab347d38e6b377abe52b35915b4a6966cd77cf84.tar.gz openbsd-ab347d38e6b377abe52b35915b4a6966cd77cf84.tar.bz2 openbsd-ab347d38e6b377abe52b35915b4a6966cd77cf84.zip | |
Fix a memory leak in an error path.
From OpenSSL commit 5e5d53d341fd9a9b9cc0a58eb3690832ca7a511f.
ok guenther@, logan@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_asn1.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c index f01008ec43..e1d3f6bad7 100644 --- a/src/lib/libcrypto/ec/ec_asn1.c +++ b/src/lib/libcrypto/ec/ec_asn1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_asn1.c,v 1.13 2015/03/19 14:00:22 tedu Exp $ */ | 1 | /* $OpenBSD: ec_asn1.c,v 1.14 2015/03/20 03:02:51 doug Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -1235,6 +1235,8 @@ d2i_ECParameters(EC_KEY ** a, const unsigned char **in, long len) | |||
| 1235 | 1235 | ||
| 1236 | if (!d2i_ECPKParameters(&ret->group, in, len)) { | 1236 | if (!d2i_ECPKParameters(&ret->group, in, len)) { |
| 1237 | ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_EC_LIB); | 1237 | ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_EC_LIB); |
| 1238 | if (a == NULL || *a != ret) | ||
| 1239 | EC_KEY_free(ret); | ||
| 1238 | return NULL; | 1240 | return NULL; |
| 1239 | } | 1241 | } |
| 1240 | 1242 | ||
