From patchwork Thu Feb 26 22:56:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 45207 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 542F420BF9 for ; Thu, 26 Feb 2015 22:56:58 +0000 (UTC) Received: by wesq59 with SMTP id q59sf10842467wes.2 for ; Thu, 26 Feb 2015 14:56:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=YTHhm1KsziP0xSucj6EJeWardfIrv1ETFkV70WXfUjw=; b=f9aAxTB4BXiD3/oCL22fL/rkLsCpyBoAVDqrR5UzxJ2YkCLYS34Li6jQ5e0jNeMVG9 llYNyElOE+4ebDnYXRimgl2pCMD2Tnpv9ha7DmqBCHRvSn1/NW/W1d2sUHVMOjpmk6c9 pSB+BtrjLP/z4s3h3tbdi19KLC3K2NGGqPBc+yPJ47ll+UazmK0XsPmSau7aIYJqZn+t ruNYKaaDhGUlI/7ew9ZwtDkUXqWJl/zP99F58fF/XsX0DzAWJV1iRnhQHNHAq6xdkAr2 JV1Y4D+JyqumK/hWs+jfv+PZ0DRur9xjrSE+LBQld24re0uuKV1AGUfzopS83UDVsXm7 9Srw== X-Gm-Message-State: ALoCoQmgD0ut0VmC1vlejzuoR9l6bg6htqa3V8LNt+nvllPgkKBq9/AlPANyOvrlyuXZO97LTNHw X-Received: by 10.152.36.132 with SMTP id q4mr1639300laj.6.1424991417585; Thu, 26 Feb 2015 14:56:57 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.36 with SMTP id n4ls86722laj.27.gmail; Thu, 26 Feb 2015 14:56:57 -0800 (PST) X-Received: by 10.112.235.10 with SMTP id ui10mr10008671lbc.77.1424991417443; Thu, 26 Feb 2015 14:56:57 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id px4si1671079lac.63.2015.02.26.14.56.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2015 14:56:57 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labhs14 with SMTP id hs14so14107165lab.1 for ; Thu, 26 Feb 2015 14:56:57 -0800 (PST) X-Received: by 10.152.26.199 with SMTP id n7mr9708131lag.29.1424991417314; Thu, 26 Feb 2015 14:56:57 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp3578247lbj; Thu, 26 Feb 2015 14:56:56 -0800 (PST) X-Received: by 10.229.197.134 with SMTP id ek6mr23383292qcb.21.1424991415159; Thu, 26 Feb 2015 14:56:55 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id c4si2263723qam.61.2015.02.26.14.56.53 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Feb 2015 14:56:55 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YR7MR-0008V4-Cs; Thu, 26 Feb 2015 22:56:51 +0000 Received: from mail-lb0-f172.google.com ([209.85.217.172]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YR7MM-0008Uw-8g for lng-odp@lists.linaro.org; Thu, 26 Feb 2015 22:56:46 +0000 Received: by lbiz11 with SMTP id z11so13920682lbi.5 for ; Thu, 26 Feb 2015 14:56:40 -0800 (PST) X-Received: by 10.112.78.37 with SMTP id y5mr9612292lbw.91.1424991400311; Thu, 26 Feb 2015 14:56:40 -0800 (PST) Received: from localhost.localdomain ([80.77.38.170]) by mx.google.com with ESMTPSA id x9sm476679lax.20.2015.02.26.14.56.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Feb 2015 14:56:39 -0800 (PST) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Fri, 27 Feb 2015 00:56:35 +0200 Message-Id: <1424991395-28433-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: crypto patch Subject: [lng-odp] [PATCH] validation: crypto: destroy session in case of failure X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Taras Kondratiuk Reviewed-by: Bill Fischofer --- test/validation/crypto/odp_crypto_test_async_inp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c b/test/validation/crypto/odp_crypto_test_async_inp.c index aff93da..9e4e9f1 100644 --- a/test/validation/crypto/odp_crypto_test_async_inp.c +++ b/test/validation/crypto/odp_crypto_test_async_inp.c @@ -92,8 +92,8 @@ static void alg_test(enum odp_crypto_op op, rc = odp_crypto_operation(&op_params, &posted, NULL); if (rc < 0) { - odp_packet_free(pkt); - CU_FAIL_FATAL("Failed odp_crypto_operation()"); + CU_FAIL("Failed odp_crypto_operation()"); + goto cleanup; } CU_ASSERT(posted); @@ -112,7 +112,7 @@ static void alg_test(enum odp_crypto_op op, CU_ASSERT(!memcmp(data_addr, output_vec, output_vec_len)); CU_ASSERT(result.ctx == (void *)0xdeadbeef); - +cleanup: rc = odp_crypto_session_destroy(session); CU_ASSERT(!rc);