From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Kerlin Subject: [examples/ip_pipeline: fix wrong size of argument 1/1] Date: Fri, 8 Apr 2016 14:49:37 +0200 Message-ID: <1460119777-12703-1-git-send-email-marcinx.kerlin@intel.com> Cc: Marcin Kerlin To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AC2222BA8 for ; Fri, 8 Apr 2016 14:46:04 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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