浏览代码

some line-edit facilities must free the line after its use

Roberto Ierusalimschy 20 年之前
父节点
当前提交
f1eb79fdf4
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lua.c

+ 2 - 1
lua.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lua.c,v 1.135 2005/01/10 17:21:10 roberto Exp roberto $
+** $Id: lua.c,v 1.136 2005/03/21 18:12:07 roberto Exp roberto $
 ** Lua stand-alone interpreter
 ** Lua stand-alone interpreter
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -186,6 +186,7 @@ static int pushline (lua_State *L, int firstline) {
     lua_pushfstring(L, "return %s", b+1);  /* change it to `return' */
     lua_pushfstring(L, "return %s", b+1);  /* change it to `return' */
   else
   else
     lua_pushstring(L, b);
     lua_pushstring(L, b);
+  lua_freeline(L, b);
   return 1;
   return 1;
 }
 }