Skip to content

Commit b36e27c

Browse files
committed
fix a bug in bh queue
1 parent bff386f commit b36e27c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

core/shared/utils/bh_queue.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ bh_post_msg(bh_queue *queue, unsigned short tag, void *body, unsigned int len)
132132
{
133133
bh_queue_node *msg = bh_new_msg(tag, body, len, NULL);
134134
if (msg == NULL) {
135+
bh_queue_mutex_lock(&queue->queue_lock);
135136
queue->drops++;
137+
bh_queue_mutex_unlock(&queue->queue_lock);
136138
if (len != 0 && body)
137139
BH_FREE(body);
138140
return false;

0 commit comments

Comments
 (0)