publickey_list_free: no return value from a void function
Fixed a compiler warning I introduced previously when checking input arguments more. I also added a check for the other pointer to avoid NULL pointer dereferences.
This commit is contained in:
parent
1d83b520b4
commit
46be03f92b
@ -999,8 +999,8 @@ libssh2_publickey_list_free(LIBSSH2_PUBLICKEY * pkey,
|
|||||||
LIBSSH2_SESSION *session;
|
LIBSSH2_SESSION *session;
|
||||||
libssh2_publickey_list *p = pkey_list;
|
libssh2_publickey_list *p = pkey_list;
|
||||||
|
|
||||||
if(!pkey)
|
if(!pkey || !p)
|
||||||
return LIBSSH2_ERROR_BAD_USE;
|
return;
|
||||||
|
|
||||||
session = pkey->channel->session;
|
session = pkey->channel->session;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user