diff options
author | Nikos Mavrogiannopoulos <nmav@crystal.(none)> | 2008-04-12 02:18:46 +0300 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@crystal.(none)> | 2008-04-12 02:18:46 +0300 |
commit | 778e38b506d4e7a2ced58dbce762ee9a7140f1f4 (patch) | |
tree | 06ed6f0449c523c57d15a31850868086e7002ff2 /lib | |
parent | 4e6c8228bf5dc250c81fb423940d5beffe1befd6 (diff) | |
download | gnutls-778e38b506d4e7a2ced58dbce762ee9a7140f1f4.tar.gz |
Deallocate memory from parameters only when function run was successful.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/openpgp/output.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/openpgp/output.c b/lib/openpgp/output.c index c9ce42e1f0..c5b3276c67 100644 --- a/lib/openpgp/output.c +++ b/lib/openpgp/output.c @@ -250,10 +250,11 @@ print_key_info(gnutls_string * str, gnutls_openpgp_crt_t cert, int idx) hexdump (str, m.data, m.size, "\t\t\t"); addf (str, _("\t\tExponent:\n")); hexdump (str, e.data, e.size, "\t\t\t"); + + gnutls_free (m.data); + gnutls_free (e.data); } - gnutls_free (m.data); - gnutls_free (e.data); } break; @@ -278,6 +279,11 @@ print_key_info(gnutls_string * str, gnutls_openpgp_crt_t cert, int idx) hexdump (str, q.data, q.size, "\t\t\t"); addf (str, _("\t\tG:\n")); hexdump (str, g.data, g.size, "\t\t\t"); + + gnutls_free (p.data); + gnutls_free (q.data); + gnutls_free (g.data); + gnutls_free (y.data); } } break; |