* [dpdk-dev] [examples/ip_pipeline: fix wrong size of argument 1/1]
@ 2016-04-08 12:49 Marcin Kerlin
2016-04-08 13:32 ` [dpdk-dev] [PATCH v2 1/1] examples/ip_pipeline: fix wrong size of argument Marcin Kerlin
0 siblings, 1 reply; 3+ messages in thread
From: Marcin Kerlin @ 2016-04-08 12:49 UTC (permalink / raw)
To: dev; +Cc: Marcin Kerlin
CID 120150:
Wrong size of the allocated memory. Passing argument as size of pointer
(8UL) instead of size of structure app_pipeline_firewall_rule.
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
---
examples/ip_pipeline/pipeline/pipeline_firewall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH v2 1/1] examples/ip_pipeline: fix wrong size of argument
2016-04-08 12:49 [dpdk-dev] [examples/ip_pipeline: fix wrong size of argument 1/1] Marcin Kerlin
@ 2016-04-08 13:32 ` Marcin Kerlin
2016-04-08 20:13 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Marcin Kerlin @ 2016-04-08 13:32 UTC (permalink / raw)
To: dev; +Cc: Marcin Kerlin
v2:
added fixline
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>
---
examples/ip_pipeline/pipeline/pipeline_firewall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-08 20:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 12:49 [dpdk-dev] [examples/ip_pipeline: fix wrong size of argument 1/1] Marcin Kerlin
2016-04-08 13:32 ` [dpdk-dev] [PATCH v2 1/1] examples/ip_pipeline: fix wrong size of argument Marcin Kerlin
2016-04-08 20:13 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).