From 14a7435a6f444613a05f6d1ae2625dfdd4b6d64f Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Thu, 24 May 2018 13:59:18 +0200 Subject: [PATCH] virt plugin: take mutex when setting member Purely cosmetic here, but this should fix CID 185977. --- src/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/virt.c b/src/virt.c index 37853852..caaf077e 100644 --- a/src/virt.c +++ b/src/virt.c @@ -1898,7 +1898,9 @@ static int virt_notif_thread_init(virt_notif_thread_t *thread_data) { * domain_event_cb_id to '-1' */ thread_data->domain_event_cb_id = -1; + pthread_mutex_lock(&thread_data->active_mutex); thread_data->is_active = 0; + pthread_mutex_unlock(&thread_data->active_mutex); return 0; } -- 2.11.0