Fix locking release for updating logq
This commit is contained in:
parent
7ae7d637a3
commit
dd01a9ce4a
1 changed files with 5 additions and 2 deletions
|
@ -213,11 +213,12 @@ static void WriteQueuedLogs(int count) {
|
|||
break;
|
||||
}
|
||||
|
||||
mlogqs.releasewritelock();
|
||||
|
||||
//if we have no logs to write, we're done
|
||||
if ((logq = pending_head.next) == &pending_tail)
|
||||
{
|
||||
mlogqs.releasewritelock();
|
||||
return;
|
||||
}
|
||||
|
||||
while (logq != &pending_tail) {
|
||||
if (log_type_info[logq->log_type].console) {
|
||||
|
@ -256,6 +257,8 @@ static void WriteQueuedLogs(int count) {
|
|||
tmp = logq;
|
||||
logq = logq->next;
|
||||
|
||||
mlogqs.releasewritelock();
|
||||
|
||||
free(tmp->text);
|
||||
free(tmp);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue