From patchwork Tue Mar 15 12:15:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balakrishna Garapati X-Patchwork-Id: 63867 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp624546lbc; Tue, 15 Mar 2016 05:15:55 -0700 (PDT) X-Received: by 10.140.101.147 with SMTP id u19mr38544438qge.71.1458044155135; Tue, 15 Mar 2016 05:15:55 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g49si2511639qge.120.2016.03.15.05.15.54; Tue, 15 Mar 2016 05:15:55 -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 Received: by lists.linaro.org (Postfix, from userid 109) id 5238F62F36; Tue, 15 Mar 2016 12:15:54 +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_H3, RCVD_IN_MSPIKE_WL, 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 616106178C; Tue, 15 Mar 2016 12:15:46 +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 2C49462F10; Tue, 15 Mar 2016 12:15:44 +0000 (UTC) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by lists.linaro.org (Postfix) with ESMTPS id 3707D6177C for ; Tue, 15 Mar 2016 12:15:43 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id bc4so19888678lbc.2 for ; Tue, 15 Mar 2016 05:15:43 -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=f9WFQ/eKAfPH0QiF2RuHA6SCaPB4Sw5qh+toS/Y3zb0=; b=CQmRqpc1wS36GBa2n3m0YtXW4xSOKl45O+8S1411y4RH3EjErVMwN0myqzFJfduWWV 9VXvZHUTnAbM5N+dlDi8xIMl/KB5u/u8OWhvepKYp2F+n/UkGrBQV8dqDmXfzWRwpNnT 8HL9ks18tWRy7k57hTxkW/1pFDuV6SEHvOP/xkXmr2VdotXBZ0wSRhQvBwLXKfCvNbT8 t/vMFQsXR178lSBVvI0CxrATC+Wuj07UXBU3tYkf+zOvcYYOf0dOvAwQt5TCVwAp76Qz /rCMJRNoLNlBkc9BifW0SXLucop1DsLAbFQqTlP2A5DlGvHK8xJimKsScMQ/ygf9EQ5V XgrQ== X-Gm-Message-State: AD7BkJK95V8gb2dEIbhsiVws9pX1Fp7T+R6LUS+B4uRUF79P0azr8mo8owxT4PR7ZRLlhNYIFIo= X-Received: by 10.25.34.213 with SMTP id i204mr10182390lfi.120.1458044142156; Tue, 15 Mar 2016 05:15:42 -0700 (PDT) Received: from elxahtkds32.localdomain (host-95-195-70-39.mobileonline.telia.com. [95.195.70.39]) by smtp.gmail.com with ESMTPSA id e66sm4188303lfg.23.2016.03.15.05.15.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Mar 2016 05:15:41 -0700 (PDT) From: "balakrishna.garapati" To: bala.manoharan@linaro.org, maxim.uvarov@linaro.org Date: Tue, 15 Mar 2016 13:15:33 +0100 Message-Id: <1458044133-14433-1-git-send-email-balakrishna.garapati@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Cc: lng-odp@lists.linaro.org Subject: [lng-odp] [PATCHv2] linux-generic:release memory during session destory 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" v2:Added the whitespace after if Signed-off-by: balakrishna.garapati --- platform/linux-generic/odp_crypto.c | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.1 diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 08b479d..e468677 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -704,6 +704,8 @@ int odp_crypto_session_destroy(odp_crypto_session_t session) odp_crypto_generic_session_t *generic; generic = (odp_crypto_generic_session_t *)(intptr_t)session; + if (generic->cipher.alg == ODP_CIPHER_ALG_AES128_GCM) + EVP_CIPHER_CTX_free(generic->cipher.data.aes_gcm.ctx); memset(generic, 0, sizeof(*generic)); free_session(generic); return 0;