mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
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>
This commit is contained in:
committed by
Ilya Maximets
parent
b0008d6233
commit
0287f840e8
@@ -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;
|
||||
|
Reference in New Issue
Block a user