mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-09-02 17:21:15 +03:00
Fix memleak in sample.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@547 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
2
sample.c
2
sample.c
@@ -487,11 +487,13 @@ int main(int argc, char **argv){
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case SSH_SERVER_ERROR:
|
case SSH_SERVER_ERROR:
|
||||||
|
free(hash);
|
||||||
fprintf(stderr,"%s",ssh_get_error(session));
|
fprintf(stderr,"%s",ssh_get_error(session));
|
||||||
ssh_disconnect(session);
|
ssh_disconnect(session);
|
||||||
ssh_finalize();
|
ssh_finalize();
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
free(hash);
|
||||||
|
|
||||||
ssh_userauth_none(session, NULL);
|
ssh_userauth_none(session, NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user