]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
utils_ovs: Avoid potential access of freed memory 2801/head
authorCiara Loftus <ciara.loftus@intel.com>
Tue, 29 May 2018 13:46:31 +0000 (14:46 +0100)
committerCiara Loftus <ciara.loftus@intel.com>
Tue, 29 May 2018 13:48:49 +0000 (14:48 +0100)
Fixes #2800
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
src/utils_ovs.c

index 3b7236cadc4642a2c4d4e0f128eed4e234f7bb0f..4ca86aebe1d54df4e1e5f7ff5a47bbcac3b002d7 100644 (file)
@@ -1051,6 +1051,8 @@ ovs_db_t *ovs_db_init(const char *node, const char *service,
     ret = ovs_db_destroy(pdb);
     if (ret > 0)
       goto failure;
+    else
+      return NULL;
   }
 
   /* init polling thread */
@@ -1059,6 +1061,8 @@ ovs_db_t *ovs_db_init(const char *node, const char *service,
     if (ret > 0) {
       ovs_db_event_thread_data_destroy(pdb);
       goto failure;
+    } else {
+      return NULL;
     }
   }
   return pdb;