This patch fixes a potential null pointer dereference reported
by Coverity if an null actions list is passed to nl_attr_get()
in odp_execute_sample().
Fixes: 26c6b6cd2b2e ("dpif-netdev: Implement OVS_ACTION_ATTR_SAMPLE action.")
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
}
}
+ if (!subactions) {
+ if (steal) {
+ COVERAGE_INC(datapath_drop_sample_error);
+ dp_packet_delete(packet);
+ }
+ return;
+ }
+
if (!steal) {
/* The 'subactions' may modify the packet, but the modification
* should not propagate beyond this sample action. Make a copy