mirror of
https://github.com/bol-van/zapret2.git
synced 2026-10-29 06:02:05 +00:00
nfqws2: fix unitialized lua_ref field access
This commit is contained in:
1 parent
211867eca5
commit
7b82744d4d
1 file changed
+1
-1
+1
-1
@@ -42,6 +42,7 @@ struct timer_pool *TimerPoolSearch(timer_pool *p, const char *str)
|
||||
struct timer_pool *TimerPoolAdd(timer_pool **pp, const char *str, const char *func, uint64_t period, bool oneshot)
|
||||
{
|
||||
ADD_STR_POOL(timer_pool, pp, str, strlen(str))
|
||||
elem->lua_ref = LUA_NOREF;
|
||||
if (!(elem->func = strdup(func)))
|
||||
{
|
||||
TimerPoolDel(pp,elem);
|
||||
@@ -49,7 +50,6 @@ struct timer_pool *TimerPoolAdd(timer_pool **pp, const char *str, const char *fu
|
||||
}
|
||||
elem->period = period;
|
||||
elem->oneshot = oneshot;
|
||||
elem->lua_ref = LUA_NOREF;
|
||||
elem->bt_next = boottime_ms() + elem->period;
|
||||
elem->n = ++timer_n;
|
||||
elem->fires = 0;
|
||||
|
||||
Reference in new issue
Block a user