From: Ciara Loftus Date: Tue, 29 May 2018 13:46:31 +0000 (+0100) Subject: utils_ovs: Avoid potential access of freed memory X-Git-Tag: collectd-5.9.0~225^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2801%2Fhead;p=thirdparty%2Fcollectd.git utils_ovs: Avoid potential access of freed memory Fixes #2800 Signed-off-by: Ciara Loftus --- diff --git a/src/utils_ovs.c b/src/utils_ovs.c index 3b7236cad..4ca86aebe 100644 --- a/src/utils_ovs.c +++ b/src/utils_ovs.c @@ -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;