From 20e7ec96ae01d4367a7fbcd87bdbf0fa6496492b Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Wed, 28 Apr 2010 18:43:41 +0200 Subject: Fix bugs found by clang analyzer --- libssh/sftp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libssh/sftp.c') diff --git a/libssh/sftp.c b/libssh/sftp.c index 51411427..82c00341 100644 --- a/libssh/sftp.c +++ b/libssh/sftp.c @@ -104,12 +104,10 @@ static void sftp_ext_free(sftp_ext ext) { sftp_session sftp_new(ssh_session session){ sftp_session sftp; - enter_function(); - if (session == NULL) { - leave_function(); return NULL; } + enter_function(); sftp = malloc(sizeof(struct sftp_session_struct)); if (sftp == NULL) { @@ -123,7 +121,7 @@ sftp_session sftp_new(ssh_session session){ if (sftp->ext == NULL) { ssh_set_error_oom(session); SAFE_FREE(sftp); - sftp_leave_function(); + leave_function(); return NULL; } -- cgit v1.2.3