From 89917df20ebd975738501b5cfe83e007f71564b0 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Fri, 11 Apr 2014 12:36:09 +0400 Subject: ipoe:lua: update thread-specific value when updating L (fixes segfault) Signed-off-by: Dmitry Kozlov --- accel-pppd/ctrl/ipoe/lua.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'accel-pppd/ctrl') diff --git a/accel-pppd/ctrl/ipoe/lua.c b/accel-pppd/ctrl/ipoe/lua.c index ab95e417..4fb6380a 100644 --- a/accel-pppd/ctrl/ipoe/lua.c +++ b/accel-pppd/ctrl/ipoe/lua.c @@ -204,6 +204,7 @@ out_err: log_ppp_error("ipoe: lua: %s\n", lua_tostring(L, -1)); lua_close(L); L = NULL; + pthread_setspecific(__key, L); } /*static void stackDump (lua_State *L) { @@ -266,6 +267,7 @@ out_err: file_error = 1; lua_close(L); L = NULL; + pthread_setspecific(__key, L); return -1; } -- cgit v1.2.3