summaryrefslogtreecommitdiffhomepage
path: root/cli-authinteract.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-07-07 07:00:10 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-07-07 07:00:10 +0000
commitcee2ec168028b624a17df4b3574b57656861e807 (patch)
tree2a534c409d94ac156ff6cdf8862b8dbff82f9e4e /cli-authinteract.c
parent934a6d417dba64d88e317fdcf7f794510f727fca (diff)
BUG: The strings 'name' and 'instruction' are always allocated
but are only freed if the length of the string is greater then zero. They should always be freed. FIX: take the m_free(<string>) out of the conditional From Erik Hovland --HG-- extra : convert_revision : 13227a7365411821cb194fb45ccb23a9b9fb98cc
Diffstat (limited to 'cli-authinteract.c')
-rw-r--r--cli-authinteract.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli-authinteract.c b/cli-authinteract.c
index 5a169cb..5fe5bf1 100644
--- a/cli-authinteract.c
+++ b/cli-authinteract.c
@@ -99,13 +99,14 @@ void recv_msg_userauth_info_request() {
if (strlen(name) > 0) {
cleantext(name);
fprintf(stderr, "%s", name);
- m_free(name);
}
+ m_free(name);
+
if (strlen(instruction) > 0) {
cleantext(instruction);
fprintf(stderr, "%s", instruction);
- m_free(instruction);
}
+ m_free(instruction);
for (i = 0; i < num_prompts; i++) {
unsigned int response_len = 0;