mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 12:36:09 -07:00
fix several memory leaks
This commit is contained in:
parent
b763262c4a
commit
f80dc5aa02
1 changed files with 9 additions and 3 deletions
12
hydra-ftp.c
12
hydra-ftp.c
|
@ -26,8 +26,10 @@ int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf("[INFO] user %s does not exist, skipping\n", login);
|
printf("[INFO] user %s does not exist, skipping\n", login);
|
||||||
hydra_completed_pair_skip();
|
hydra_completed_pair_skip();
|
||||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) {
|
||||||
|
free(buf);
|
||||||
return 4;
|
return 4;
|
||||||
|
}
|
||||||
free(buf);
|
free(buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -35,8 +37,10 @@ int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char
|
||||||
if (buf[0] == '2') {
|
if (buf[0] == '2') {
|
||||||
hydra_report_found_host(port, ip, "ftp", fp);
|
hydra_report_found_host(port, ip, "ftp", fp);
|
||||||
hydra_completed_pair_found();
|
hydra_completed_pair_found();
|
||||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) {
|
||||||
|
free(buf);
|
||||||
return 4;
|
return 4;
|
||||||
|
}
|
||||||
free(buf);
|
free(buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -61,8 +65,10 @@ int32_t start_ftp(int32_t s, char *ip, int32_t port, unsigned char options, char
|
||||||
if (buf[0] == '2') {
|
if (buf[0] == '2') {
|
||||||
hydra_report_found_host(port, ip, "ftp", fp);
|
hydra_report_found_host(port, ip, "ftp", fp);
|
||||||
hydra_completed_pair_found();
|
hydra_completed_pair_found();
|
||||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0) {
|
||||||
|
free(buf);
|
||||||
return 4;
|
return 4;
|
||||||
|
}
|
||||||
free(buf);
|
free(buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue