Skip to content

Commit

Permalink
FIX: ssh_get_error shouldnt be used after ssh_free
Browse files Browse the repository at this point in the history
  • Loading branch information
matricali committed Feb 21, 2024
1 parent 2dbcf5b commit b855a89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bruteforce_ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ int bruteforce_ssh_login(btkg_context_t *context, const char *hostname,
int r;
r = ssh_connect(my_ssh_session);
if (r != SSH_OK) {
ssh_free(my_ssh_session);
if (context->verbose & CBRUTEKRAG_VERBOSE_MODE) {
log_error("[!] Error connecting to %s:%d %s.", hostname,
port, ssh_get_error(my_ssh_session));
}
ssh_free(my_ssh_session);
return -1;
}

Expand Down

0 comments on commit b855a89

Please sign in to comment.