ovs_stats plugin: Add missing unlock.
authorFlorian Forster <octo@collectd.org>
Fri, 17 Nov 2017 14:37:57 +0000 (15:37 +0100)
committerFlorian Forster <octo@collectd.org>
Fri, 17 Nov 2017 14:37:57 +0000 (15:37 +0100)
CID: 179234

src/ovs_stats.c

index 538386a..8309223 100644 (file)
@@ -332,6 +332,7 @@ static int ovs_stats_update_bridge(yajl_val bridge) {
         if (br == NULL) {
           br = (bridge_list_t *)calloc(1, sizeof(bridge_list_t));
           if (!br) {
+            pthread_mutex_unlock(&g_stats_lock);
             ERROR("%s: Error allocating memory for bridge", plugin_name);
             return -1;
           }