fix wrong free (windows -nw)
Allan CORNET [Fri, 29 May 2009 14:46:37 +0000 (16:46 +0200)]
scilab/modules/shell/src/c/windows/TermReadAndProcess.c

index 39142c6..113e0fc 100644 (file)
 #include "TermConsole.h"
 #include "diary.h"
 /*--------------------------------------------------------------------------*/
-static char *returnedline = NULL;
-/*--------------------------------------------------------------------------*/
 char * TermReadAndProcess(void)
 {
+       char *returnedline = NULL;
        static char save_prompt[PROMPT_SIZE_MAX];
 
-       /* free previous line */
-       if (returnedline) {FREE(returnedline);returnedline = NULL;}
-
     if (GetTemporaryPrompt() != NULL) /* Input function is used */
     {
                returnedline = TerminalGetString(GetTemporaryPrompt());