diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-01-02 12:02:53 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-01-05 09:02:12 +0100 |
commit | a043ae094282ce70abdfe07199d80e0bd3be2bdb (patch) | |
tree | 12b291c6e580f4376ad382c848784a713a8fd1e5 | |
parent | a827b66611de0ee926662d59366ae978cec77dd9 (diff) | |
download | gnutls-a043ae094282ce70abdfe07199d80e0bd3be2bdb.tar.gz |
x509: address leak in print_altname - cert printing
-rw-r--r-- | lib/x509/output.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/x509/output.c b/lib/x509/output.c index dc8fa18710..04a4ee9273 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -691,7 +691,7 @@ print_altname(gnutls_buffer_st * str, const char *prefix, gnutls_datum_t *der) if (err < 0) { addf(str, "error: gnutls_x509_ext_import_subject_alt_names: %s\n", gnutls_strerror(err)); - return; + goto cleanup; } for (altname_idx = 0;; altname_idx++) { @@ -735,6 +735,8 @@ print_altname(gnutls_buffer_st * str, const char *prefix, gnutls_datum_t *der) print_name(str, pfx, type, &san, 0); } } + + cleanup: gnutls_subject_alt_names_deinit(names); } |