mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-01-06 14:21:55 +03:00
Add NULL check to private_key_free().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@383 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -661,6 +661,9 @@ PRIVATE_KEY *_privatekey_from_file(void *session,char *filename,int type){
|
||||
* \param prv a PRIVATE_KEY object
|
||||
*/
|
||||
void private_key_free(PRIVATE_KEY *prv){
|
||||
if (prv == NULL) {
|
||||
return;
|
||||
}
|
||||
#ifdef HAVE_LIBGCRYPT
|
||||
if(prv->dsa_priv)
|
||||
gcry_sexp_release(prv->dsa_priv);
|
||||
|
||||
Reference in New Issue
Block a user