Skip to content

Commit

Permalink
Fix memory leak in radmin2
Browse files Browse the repository at this point in the history
`msg` is calloc'd a few lines above via `msg = buffer2message(buffer);`.
The check afterwards either exits the process on success or restarts the
loop without free'ing `msg`.
  • Loading branch information
Teemperor committed Apr 11, 2022
1 parent 354d973 commit 64ca3ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hydra-radmin2.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ void service_radmin2(char *ip, int32_t sp, unsigned char options, char *miscptr,
hydra_report(stderr, "Error: Child with pid %d terminating, protocol error\n", (int32_t)getpid());
hydra_child_exit(2);
}
free(msg);
}
#endif
}
Expand Down

0 comments on commit 64ca3ae

Please sign in to comment.