net/enic: check in error path

Coverity issue: 363046
Fixes: bb66d562ae ("net/enic: share flow actions with same signature")

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
John Daley 2020-10-14 13:25:22 -07:00 committed by Ferruh Yigit
parent 8d035cb217
commit b51a6d07fa

View File

@ -2232,7 +2232,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
error_with_action_handle:
args[0] = FM_ACTION_FREE;
args[1] = ah->handle;
flowman_cmd(fm, args, 2);
ret = flowman_cmd(fm, args, 2);
if (ret != 0)
rte_flow_error_set(error, -ret,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL, "enic: devcmd(action-free)");
error_with_ah:
free(ah);
return ret;