summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-04-11 12:36:09 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-04-11 12:36:09 +0400
commit89917df20ebd975738501b5cfe83e007f71564b0 (patch)
treec3b8f927525815b43b48726f1d92f3ce964dc4a8 /accel-pppd/ctrl
parentbf5340291badcc631bd855bb924593cd445ecd26 (diff)
downloadaccel-ppp-89917df20ebd975738501b5cfe83e007f71564b0.tar.gz
accel-ppp-89917df20ebd975738501b5cfe83e007f71564b0.zip
ipoe:lua: update thread-specific value when updating L (fixes segfault)
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r--accel-pppd/ctrl/ipoe/lua.c2
1 files changed, 2 insertions, 0 deletions
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;
}