diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-12-07 16:01:04 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-12-07 16:01:04 +0000 |
commit | 0d0884c3b9232e59227f3de45a774fb394e61a54 (patch) | |
tree | f1d780e249724273ff601f65a20b978d2286a460 /lib/libtls | |
parent | 5141b742ffac9786196f8d1bb07c8eabd5bda701 (diff) |
Fix a memory leak in tls_check_subject_altname() by calling
sk_GENERAL_NAME_pop_free() instead of sk_GENERAL_NAME_free(). The latter
only frees the stack itself and does not free the items.
From Basskrapfen on github.
Diffstat (limited to 'lib/libtls')
-rw-r--r-- | lib/libtls/tls_verify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libtls/tls_verify.c b/lib/libtls/tls_verify.c index 35a18202a9f..ddc403fb10d 100644 --- a/lib/libtls/tls_verify.c +++ b/lib/libtls/tls_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_verify.c,v 1.3 2014/12/07 15:48:02 bcook Exp $ */ +/* $OpenBSD: tls_verify.c,v 1.4 2014/12/07 16:01:03 jsing Exp $ */ /* * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> * @@ -155,7 +155,7 @@ tls_check_subject_altname(X509 *cert, const char *host) } } - sk_GENERAL_NAME_free(altname_stack); + sk_GENERAL_NAME_pop_free(altname_stack, GENERAL_NAME_free); return rv; } |