Coverity reported a possible null dereference of datum->values
when handling value-type weak references in find_and_add_weak_refs().
In practice, datum->values must be non-NULL for value-type weak references.
Adding ovs_assert(datum->values) documents this invariant and ensures that
we catch any unexpected misuse.
No change to runtime behavior in production builds; this only improves
safety and satisfies static analysis.
Acked-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
}
if (ovsdb_base_type_is_weak_ref(&column->type.value)) {
+ ovs_assert(!datum->n || datum->values);
for (i = 0; i < datum->n; i++) {
find_and_add_weak_ref(src, &datum->keys[i], &datum->values[i],
column, false, ref_list, not_found, zero);