diff options
author | Simon Josefsson <simon@josefsson.org> | 2011-11-09 11:08:12 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2011-11-09 11:18:52 +0100 |
commit | 95bec0fb1aa37dad34cbd8411ca51bbe51262b3e (patch) | |
tree | a115cb6f3aee6919763c0f245651c7b03d7284b0 | |
parent | e71de0c575571ae86b507b9c1678ef53fa9e64fd (diff) | |
download | gnutls-95bec0fb1aa37dad34cbd8411ca51bbe51262b3e.tar.gz |
Don't crash if gnutls_pubkey_deinit is given a NULL key.
-rw-r--r-- | lib/gnutls_pubkey.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c index 74ce0b80f5..fbbaa57e2f 100644 --- a/lib/gnutls_pubkey.c +++ b/lib/gnutls_pubkey.c @@ -157,7 +157,9 @@ gnutls_pubkey_init (gnutls_pubkey_t * key) void gnutls_pubkey_deinit (gnutls_pubkey_t key) { - gnutls_pk_params_release(&key->params); + if (!key) + return; + gnutls_pk_params_release (&key->params); gnutls_free (key); } |