diff cli-authinteract.c @ 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 475a818dd6e7
children a24139ba08c8
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;