aboutsummaryrefslogtreecommitdiff
path: root/Lua/lbp.c
diff options
context:
space:
mode:
Diffstat (limited to 'Lua/lbp.c')
-rw-r--r--Lua/lbp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lua/lbp.c b/Lua/lbp.c
index 7c5db3e..462995d 100644
--- a/Lua/lbp.c
+++ b/Lua/lbp.c
@@ -33,9 +33,11 @@ static void push_match(lua_State *L, match_t *m, const char *start);
lua_State *cur_state = NULL;
-static void match_error(const char *msg)
+static void match_error(char **msg)
{
- lua_pushstring(cur_state, msg);
+ lua_pushstring(cur_state, *msg);
+ free(*msg);
+ *msg = NULL;
lua_error(cur_state);
}