diff options
author | 2014-07-17 07:13:02 +0000 | |
---|---|---|
committer | 2014-07-17 07:13:02 +0000 | |
commit | 4a9ba4e77a672b00eff9325cd392d10c9981e27e (patch) | |
tree | d1827188dae519f0ae15759e1d9473711b6cc8e1 /lib/libssl/src | |
parent | Convert a couple calloc()s that were originally malloc()s to reallocarray()s. (diff) | |
download | wireguard-openbsd-4a9ba4e77a672b00eff9325cd392d10c9981e27e.tar.xz wireguard-openbsd-4a9ba4e77a672b00eff9325cd392d10c9981e27e.zip |
Free sktmp when it's no longer needed. By doing so, we fix a bunch of memory leaks.
From miod@
OK from miod@ and guenther@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/x509/x509_vfy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/x509/x509_vfy.c b/lib/libssl/src/crypto/x509/x509_vfy.c index 0b0a2c56d2f..ae8484a8857 100644 --- a/lib/libssl/src/crypto/x509/x509_vfy.c +++ b/lib/libssl/src/crypto/x509/x509_vfy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.c,v 1.36 2014/07/12 17:35:23 deraadt Exp $ */ +/* $OpenBSD: x509_vfy.c,v 1.37 2014/07/17 07:13:02 logan Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -230,7 +230,9 @@ X509_verify_cert(X509_STORE_CTX *ctx) } break; } - + sk_X509_free(sktmp); + sktmp = NULL; + /* at this point, chain should contain a list of untrusted * certificates. We now need to add at least one trusted one, * if possible, otherwise we complain. */ |