Code

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 538386ae689fce2a15b2eb30948c20408015f20c..8309223b0243bec4874c486233f5394708965dab 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;
           }