ovs_stats: fix potential NULL-string dereference
authorMark Kavanagh <mark.b.kavanagh@intel.com>
Wed, 21 Feb 2018 16:15:01 +0000 (16:15 +0000)
committerCiara Loftus <ciara.loftus@intel.com>
Tue, 27 Mar 2018 09:47:10 +0000 (10:47 +0100)
commit39d06e521542649ceda75de781d5f83579df255f
treefc0e6b1b212862be878c4fb9140ebdfdc011ad82
parent4b0f10343baca980c684c7d2978b7bea684505b0
ovs_stats: fix potential NULL-string dereference

The YAJL_GET_STRING macro may return NULL; ensure that the returned
string is non-NULL, before passing it to ovs_stats_new_port(), within
the context of the ovs_stats_update_bridge() function.

Since this change introduces another return path, a single 'failure'
return point is introduced to ovs_stats_bridge().

Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
src/ovs_stats.c