mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
lib, ovsdb, vtep: Add various null pointer checks.
This commit adds various null pointer checks to some files in the `lib`, `ovsdb`, and `vtep` directories to fix several Coverity defects. These changes are grouped together as they perform similar checks, returning early, skipping some action, or logging a warning if a null pointer is encountered. Reviewed-by: Simon Horman <simon.horman@corigine.com> Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
010c256caa
commit
880a2bbb4b
@@ -205,6 +205,10 @@ shash_delete(struct shash *sh, struct shash_node *node)
|
||||
char *
|
||||
shash_steal(struct shash *sh, struct shash_node *node)
|
||||
{
|
||||
if (!node) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *name = node->name;
|
||||
|
||||
hmap_remove(&sh->map, &node->node);
|
||||
|
Reference in New Issue
Block a user