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>
This commit is contained in:
parent
c0f81e9020
commit
662c54e668
@ -834,7 +834,7 @@ app_pipeline_firewall_add_bulk(struct app_params *app,
|
|||||||
rules[i] = app_pipeline_firewall_rule_find(p, &keys[i]);
|
rules[i] = app_pipeline_firewall_rule_find(p, &keys[i]);
|
||||||
new_rules[i] = (rules[i] == NULL);
|
new_rules[i] = (rules[i] == NULL);
|
||||||
if (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);
|
RTE_CACHE_LINE_SIZE);
|
||||||
|
|
||||||
if (rules[i] == NULL) {
|
if (rules[i] == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user