Skip to content

Commit

Permalink
ofproto-dpif-ipfix: Add NULL check to dpif_ipfix_set_options().
Browse files Browse the repository at this point in the history
Coverity complains that we could potentially dereference a
NULL pointer. To prevent this warning, add an ovs_assert().

Signed-off-by: Eelco Chaudron <[email protected]>
Signed-off-by: 0-day Robot <[email protected]>
  • Loading branch information
chaudron authored and ovsrobot committed Feb 6, 2025
1 parent 171f726 commit 8494524
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ofproto/ofproto-dpif-ipfix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,8 @@ dpif_ipfix_set_options(
struct ofproto_ipfix_flow_exporter_options *options;
struct dpif_ipfix_flow_exporter_map_node *node;

ovs_assert(flow_exporters_options || n_flow_exporters_options == 0);

ovs_mutex_lock(&mutex);
dpif_ipfix_bridge_exporter_set_options(&di->bridge_exporter,
bridge_exporter_options,
Expand Down

0 comments on commit 8494524

Please sign in to comment.