From 2b35c892b601dd414fee548e31d12a60dde4dabc Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Mon, 25 Jul 2011 15:54:36 +0000 Subject: [PATCH] Fix a premature free in ss_listen() The readline support change freed input just after ss_execute_line(), but input can be used in the error block immediately following. Free input after the error block instead. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25046 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/ss/listen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ss/listen.c b/src/util/ss/listen.c index 9a7b4aee5..75b904490 100644 --- a/src/util/ss/listen.c +++ b/src/util/ss/listen.c @@ -135,7 +135,6 @@ int ss_listen (sci_idx) #endif code = ss_execute_line (sci_idx, input); - free(input); if (code == SS_ET_COMMAND_NOT_FOUND) { register char *c = input; while (*c == ' ' || *c == '\t') @@ -150,6 +149,7 @@ int ss_listen (sci_idx) "Unknown request \"%s\". Type \"?\" for a request list.", c); } + free(input); } code = 0; egress: -- 2.26.2