diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-01-12 13:23:03 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-01-16 08:54:22 +0100 |
commit | 4ac65f121ddfad667463ddbf6f2de28413942609 (patch) | |
tree | c63950af5629d123fd43c75f083d64e4ac4b4473 /tests | |
parent | 7081a4c3c3d589c09b4df5516aa194140521a825 (diff) | |
download | gnutls-4ac65f121ddfad667463ddbf6f2de28413942609.tar.gz |
tests: privkey-verify-broken: addressed uninitialized var use
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/privkey-verify-broken.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/privkey-verify-broken.c b/tests/privkey-verify-broken.c index eadeb5ecf6..aaf640d030 100644 --- a/tests/privkey-verify-broken.c +++ b/tests/privkey-verify-broken.c @@ -49,7 +49,7 @@ static int sign_verify_data(gnutls_x509_privkey_t pkey, gnutls_sign_algorithm_t { int ret; gnutls_privkey_t privkey; - gnutls_pubkey_t pubkey; + gnutls_pubkey_t pubkey = NULL; gnutls_datum_t signature; gnutls_pk_algorithm_t pk; gnutls_digest_algorithm_t dig; @@ -91,7 +91,8 @@ static int sign_verify_data(gnutls_x509_privkey_t pkey, gnutls_sign_algorithm_t ret = 0; cleanup: - gnutls_pubkey_deinit(pubkey); + if (pubkey) + gnutls_pubkey_deinit(pubkey); gnutls_privkey_deinit(privkey); gnutls_free(signature.data); |