From: Greg Hudson Date: Mon, 25 Jul 2011 15:54:36 +0000 (+0000) Subject: Fix a premature free in ss_listen() X-Git-Tag: krb5-1.10-alpha1~329 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b35c892b601dd414fee548e31d12a60dde4dabc;p=krb5.git 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 --- 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: