state: don't unlock in state lookup

The mutex should only be unlocked (from the lookup lock) by the state release
function.

Signed-off-by: Nicolás A. Ortega Froysa <nicolas.ortega@zevenet.com>
This commit is contained in:
Nicolás A. Ortega Froysa 2023-05-25 16:46:19 +02:00
parent 144c88d180
commit 85c25252b4

View File

@ -97,7 +97,6 @@ struct zproxy_http_state *zproxy_state_lookup(uint32_t proxy_id)
pthread_mutex_lock(&list_mutex);
state = _zproxy_state_lookup(proxy_id);
state->refcnt++;
pthread_mutex_unlock(&list_mutex);
return state;
}