summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMarcin Kerlin <marcinx.kerlin@intel.com>2016-04-08 15:32:24 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-04-08 22:28:39 +0200
commit662c54e668a39d58575c9a5197d1d1b78325f0f2 (patch)
tree6d75bf54d07e3b3db320e11058be636d7a1bbc96 /examples
parentc0f81e902005ef4938ce6d7735a2a597f74f1ce8 (diff)
downloaddpdk-662c54e668a39d58575c9a5197d1d1b78325f0f2.zip
dpdk-662c54e668a39d58575c9a5197d1d1b78325f0f2.tar.gz
dpdk-662c54e668a39d58575c9a5197d1d1b78325f0f2.tar.xz
examples/ip_pipeline: fix size of allocated memory
CID 120150: Wrong size of the allocated memory. Passing argument as size of pointer (8UL) instead of size of structure app_pipeline_firewall_rule. Fixes: 67ebdbef0c31 ("examples/ip_pipeline: add bulk update of firewall rules") Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/ip_pipeline/pipeline/pipeline_firewall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/ip_pipeline/pipeline/pipeline_firewall.c b/examples/ip_pipeline/pipeline/pipeline_firewall.c
index 320b25d..fd897d5 100644
--- a/examples/ip_pipeline/pipeline/pipeline_firewall.c
+++ b/examples/ip_pipeline/pipeline/pipeline_firewall.c
@@ -834,7 +834,7 @@ app_pipeline_firewall_add_bulk(struct app_params *app,
rules[i] = app_pipeline_firewall_rule_find(p, &keys[i]);
new_rules[i] = (rules[i] == NULL);
if (rules[i] == NULL) {
- rules[i] = rte_malloc(NULL, sizeof(rules[i]),
+ rules[i] = rte_malloc(NULL, sizeof(*rules[i]),
RTE_CACHE_LINE_SIZE);
if (rules[i] == NULL) {