conn_log.c:107:11: error: variable 'locked' is used uninitialized whenever 'if' condition is true