git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/enic: fix dereference before null check
[dpdk.git]
/
drivers
/
net
/
enic
/
enic_fm_flow.c
diff --git
a/drivers/net/enic/enic_fm_flow.c
b/drivers/net/enic/enic_fm_flow.c
index
bf04d71
..
d8718d1
100644
(file)
--- a/
drivers/net/enic/enic_fm_flow.c
+++ b/
drivers/net/enic/enic_fm_flow.c
@@
-2521,11
+2521,11
@@
enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
memcpy(fma, action_in, sizeof(*fma));
ah = calloc(1, sizeof(*ah));
memcpy(fma, action_in, sizeof(*fma));
ah = calloc(1, sizeof(*ah));
- memcpy(&ah->key, action_in, sizeof(struct fm_action));
if (ah == NULL)
return rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "enic: calloc(fm-action)");
if (ah == NULL)
return rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "enic: calloc(fm-action)");
+ memcpy(&ah->key, action_in, sizeof(struct fm_action));
args[0] = FM_ACTION_ALLOC;
args[1] = fm->cmd.pa;
ret = flowman_cmd(fm, args, 2);
args[0] = FM_ACTION_ALLOC;
args[1] = fm->cmd.pa;
ret = flowman_cmd(fm, args, 2);