changeset 339:31743c9bdf78

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
author Matt Johnston <matt@ucc.asn.au>
date Fri, 07 Jul 2006 07:00:10 +0000
parents 1c7a072000e0
children 454a34b2dfd1
files cli-authinteract.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cli-authinteract.c	Fri Jul 07 06:43:55 2006 +0000
+++ b/cli-authinteract.c	Fri Jul 07 07:00:10 2006 +0000
@@ -99,13 +99,14 @@
 	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;