utils_ovs: fix potential NULL dereference
authorMark Kavanagh <mark.b.kavanagh@intel.com>
Mon, 19 Feb 2018 16:39:31 +0000 (16:39 +0000)
committerCiara Loftus <ciara.loftus@intel.com>
Tue, 27 Mar 2018 09:47:17 +0000 (10:47 +0100)
commitd70f64f4c908c0016fa26c976a74511b4ac4478d
treebe90a02a11a7fc1c305e920816bd3337f1cc2544
parent2709cad046fabc6b6d3ff198dd39d188040f991c
utils_ovs: fix potential NULL dereference

In ovs_utils_get_map_value(), YAJL_GET_ARRAY may return NULL,
which is subsequently dereferenced.

Ensure that the returned pointer is non-NULL before attempting
to dereference it.

Fixes: 12f6497 ("ovs_events: Add external ids as metadata")
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
src/utils_ovs.c