From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B6E9A2949 for ; Fri, 8 Apr 2016 15:31:02 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 08 Apr 2016 06:31:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,449,1455004800"; d="scan'208";a="941080315" Received: from gklab-246-018.igk.intel.com (HELO stargo) ([10.217.246.18]) by fmsmga001.fm.intel.com with SMTP; 08 Apr 2016 06:30:51 -0700 Received: by stargo (sSMTP sendmail emulation); Fri, 08 Apr 2016 15:32:27 +0200 From: Marcin Kerlin To: dev@dpdk.org Cc: Marcin Kerlin Date: Fri, 8 Apr 2016 15:32:24 +0200 Message-Id: <1460122344-12859-1-git-send-email-marcinx.kerlin@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460119777-12703-1-git-send-email-marcinx.kerlin@intel.com> References: <1460119777-12703-1-git-send-email-marcinx.kerlin@intel.com> Subject: [dpdk-dev] [PATCH v2 1/1] examples/ip_pipeline: fix wrong size of argument X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2016 13:31:03 -0000 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 --- 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