From 461a11ee1d46140244c79b4dff3b978426187f94 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 17 Nov 2017 15:26:13 +0100 Subject: [PATCH] src/utils_ovs.c: Unlock pdb->mutex before calling ovs_db_callback_remove_all(). CID: 179240 --- src/utils_ovs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils_ovs.c b/src/utils_ovs.c index 20873247..63cb94c4 100644 --- a/src/utils_ovs.c +++ b/src/utils_ovs.c @@ -1268,6 +1268,8 @@ int ovs_db_destroy(ovs_db_t *pdb) { ovs_db_ret = (-1); } + pthread_mutex_unlock(&pdb->mutex); + /* unsubscribe callbacks */ ovs_db_callback_remove_all(pdb); @@ -1276,7 +1278,6 @@ int ovs_db_destroy(ovs_db_t *pdb) { close(pdb->sock); /* release DB handler */ - pthread_mutex_unlock(&pdb->mutex); pthread_mutex_destroy(&pdb->mutex); sfree(pdb); return ovs_db_ret; -- 2.11.0