summaryrefslogtreecommitdiff
path: root/lib/classifier.c
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2020-03-17 14:39:40 -0700
committerIlya Maximets <i.maximets@ovn.org>2020-09-15 22:31:32 +0200
commit0287f840e8b7ab0947ba6f7397c310a652a831d8 (patch)
tree5d57531fe4696a29f4552068bedc9b1f8fcf1470 /lib/classifier.c
parentb0008d6233f9fe40f97ce9b37cdd797b30fbc069 (diff)
downloadopenvswitch-0287f840e8b7ab0947ba6f7397c310a652a831d8.tar.gz
classifier: Fix use of uninitialized value.
Coverity reports use of uninitialized value of cursor. This happens in cls_cursor_start(), when rule is false, cursor.subtable is uninitialized. CID 279324. Signed-off-by: William Tu <u9012063@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/classifier.c')
-rw-r--r--lib/classifier.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/classifier.c b/lib/classifier.c
index f2c3497c2..2a1d155da 100644
--- a/lib/classifier.c
+++ b/lib/classifier.c
@@ -1370,6 +1370,7 @@ cls_cursor_start(const struct classifier *cls, const struct cls_rule *target,
struct cls_cursor cursor;
struct cls_subtable *subtable;
+ memset(&cursor, 0x0, sizeof cursor);
cursor.cls = cls;
cursor.target = target && !cls_rule_is_catchall(target) ? target : NULL;
cursor.version = version;