mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
Fix memory leak
buf variable is not freed properly from the hydra_receive_line call
This commit is contained in:
parent
2f1c1438ea
commit
85d51ba494
1 changed files with 2 additions and 0 deletions
|
@ -393,6 +393,7 @@ void service_ldap(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
|
|||
|
||||
if ((buf[0] != 0 && buf[9] == 0) || (buf[0] != 32 && buf[9] == 32)) {
|
||||
/* TLS option negociation goes well, now trying to connect */
|
||||
free(buf);
|
||||
if ((hydra_connect_to_ssl(sock, hostname) == -1) && verbose) {
|
||||
hydra_report(stderr, "[ERROR] Can't use TLS\n");
|
||||
hydra_child_exit(1);
|
||||
|
@ -403,6 +404,7 @@ void service_ldap(char *ip, int32_t sp, unsigned char options, char *miscptr, FI
|
|||
}
|
||||
} else {
|
||||
hydra_report(stderr, "[ERROR] Can't use TLS %s\n", buf);
|
||||
free(buf);
|
||||
hydra_child_exit(1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue