[SMF] fix missing initialization memory (#1458)

This commit is contained in:
Sukchan Lee 2022-03-28 22:22:24 +09:00
parent acd6610508
commit 88016a769f
1 changed files with 1 additions and 0 deletions

View File

@ -52,6 +52,7 @@ static __inline__ struct sess_state *new_state(os0_t sid)
ogs_thread_mutex_lock(&sess_state_mutex);
ogs_pool_alloc(&sess_state_pool, &new);
ogs_expect_or_return_val(new, NULL);
memset(new, 0, sizeof(*new));
ogs_thread_mutex_unlock(&sess_state_mutex);
new->gx_sid = (os0_t)ogs_strdup((char *)sid);