From patchwork Fri May 13 11:51:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 67762 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp222986qge; Fri, 13 May 2016 04:52:21 -0700 (PDT) X-Received: by 10.140.251.68 with SMTP id w65mr15564266qhc.32.1463140341489; Fri, 13 May 2016 04:52:21 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v19si216759qkb.111.2016.05.13.04.52.21; Fri, 13 May 2016 04:52:21 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 215ED61651; Fri, 13 May 2016 11:52:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 15D03615DA; Fri, 13 May 2016 11:52:17 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id C576B615E1; Fri, 13 May 2016 11:52:14 +0000 (UTC) Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by lists.linaro.org (Postfix) with ESMTPS id BA10261099 for ; Fri, 13 May 2016 11:52:13 +0000 (UTC) Received: by mail-pf0-f182.google.com with SMTP id y69so41617488pfb.1 for ; Fri, 13 May 2016 04:52:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AcqSh5Dd4aIt3/warl8/Rq0jD6ajkPk9WTktSMTeAx8=; b=aLAPAmUHr3Mks9KKJcb7aqMMYY5m0toukfOeGMs1UL6uDtWowrovC33WCuTU05BfP+ gOsljaDtdCKXZua/aznPhwoEYmTan/r+LjyyS5NxzBfJWX31wqHTMf3QU+11BNNvcWgT B0AVKbLNhOIr2P1Ql3pwZJj7+dzAaTXn9TqvswhAc6kFQ7vczn3QmdhwHyXy2r9CW2ka HyTzEQWDRrwbmKOiCzoDTbDtdtvKOrtCc7RIQgtu6unSK+7Jl+EFTkG6YUA3gJ9vyFet rsXV5jeLyi88Gk7yp5PbXJ3xjqN+o3zBmb5+n1dca8XQjN5ECWCIEo7SeVGfHE0xcVt7 Detg== X-Gm-Message-State: AOPr4FVSJy6LNHpjfP53XLSbDBcV7ax+EWLxrVxsjFrqUqVvU+wdgIGOotr+q7zsALocmoPezDw= X-Received: by 10.98.100.77 with SMTP id y74mr22322093pfb.101.1463140333042; Fri, 13 May 2016 04:52:13 -0700 (PDT) Received: from localhost.localdomain ([122.166.219.57]) by smtp.gmail.com with ESMTPSA id o6sm26960867pfo.64.2016.05.13.04.52.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 May 2016 04:52:12 -0700 (PDT) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Fri, 13 May 2016 17:21:51 +0530 Message-Id: <1463140311-20478-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: Classification patch Subject: [lng-odp] [PATCH] fix: classification: uninitialized pmr param value X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Fix memory leaked caused by uninitialized pmr param struct Fixes: https://bugs.linaro.org/show_bug.cgi?id=2227 Signed-off-by: Balasubramanian Manoharan Reviewed-by: Bill Fischofer --- test/validation/classification/odp_classification_test_pmr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/validation/classification/odp_classification_test_pmr.c b/test/validation/classification/odp_classification_test_pmr.c index 344503a..7c7d07e 100644 --- a/test/validation/classification/odp_classification_test_pmr.c +++ b/test/validation/classification/odp_classification_test_pmr.c @@ -250,6 +250,7 @@ void classification_test_pmr_term_tcp_sport(void) cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); + odp_cls_pmr_param_init(&pmr_param); pmr_param.term = ODP_PMR_TCP_SPORT; pmr_param.match.value = &val; pmr_param.match.mask = &mask; @@ -474,6 +475,7 @@ void classification_test_pmr_term_udp_sport(void) cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); + odp_cls_pmr_param_init(&pmr_param); pmr_param.term = ODP_PMR_UDP_SPORT; pmr_param.match.value = &val; pmr_param.match.mask = &mask; @@ -690,6 +692,7 @@ void classification_test_pmr_term_dmac(void) cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); + odp_cls_pmr_param_init(&pmr_param); pmr_param.term = ODP_PMR_DMAC; pmr_param.match.value = &val; pmr_param.match.mask = &mask;