From patchwork Fri Oct 24 19:46:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 39496 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 384ED20341 for ; Fri, 24 Oct 2014 19:46:57 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b15sf533685eek.9 for ; Fri, 24 Oct 2014 12:46:56 -0700 (PDT) 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:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=tmnnXQcI+drpln5tLx2VK/MIac3uXlic5mAITZLwhzQ=; b=UOu67RTH6vgnVFnyMHl4KT7WEuthI0NQUkcZE10Bh5XLpJhzRuz/YjcR82kKFE60dP 0AjudWEN75Z/wKaQisMtNRK94MC498a8nY63akJMPG0oz1gvYNgnMEG7NG+NGKGoLMbO etWex75EFYqi5YW8Y6sSz6Cf9h/4b4SCVI2h7E1WiHPqaMUcH9GA56uB6XZ5BrF52FRQ oFtMp7d/v48kj+tvARyx+kGUorJ2xSWBrsUQIaok0p3+pN3ua4g1p4l9SNAIlFRvSpVN xwBaPTtsvs60PNXc6NiKkCM/xh+lxhTnptU3GjAzKL7UVnm72Gd8TlodWPcDfBVyjrBu b+2A== X-Gm-Message-State: ALoCoQkQlLTbjqvtG8OtxC0JDjI1z9oZUQQP2XZHaRpH3R6xoy9JqkRWQAOgOZopwUmLcW3UdKlk X-Received: by 10.180.39.66 with SMTP id n2mr1187335wik.6.1414180016047; Fri, 24 Oct 2014 12:46:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.41 with SMTP id q9ls408351lag.67.gmail; Fri, 24 Oct 2014 12:46:55 -0700 (PDT) X-Received: by 10.112.162.73 with SMTP id xy9mr4946207lbb.94.1414180015889; Fri, 24 Oct 2014 12:46:55 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id am6si8323317lac.124.2014.10.24.12.46.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Oct 2014 12:46:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id f15so1850804lbj.41 for ; Fri, 24 Oct 2014 12:46:55 -0700 (PDT) X-Received: by 10.112.130.41 with SMTP id ob9mr6528314lbb.74.1414180015590; Fri, 24 Oct 2014 12:46:55 -0700 (PDT) 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.84.229 with SMTP id c5csp493951lbz; Fri, 24 Oct 2014 12:46:54 -0700 (PDT) X-Received: by 10.224.11.135 with SMTP id t7mr9428467qat.94.1414180014310; Fri, 24 Oct 2014 12:46:54 -0700 (PDT) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id d16si9462820qac.62.2014.10.24.12.46.53 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 24 Oct 2014 12:46:54 -0700 (PDT) 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 1Xhkp2-0006JO-Dx; Fri, 24 Oct 2014 19:46:52 +0000 Received: from mail-qc0-f176.google.com ([209.85.216.176]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Xhkow-0006JJ-8e for lng-odp@lists.linaro.org; Fri, 24 Oct 2014 19:46:46 +0000 Received: by mail-qc0-f176.google.com with SMTP id r5so1297007qcx.7 for ; Fri, 24 Oct 2014 12:46:41 -0700 (PDT) X-Received: by 10.224.13.2 with SMTP id z2mr9462986qaz.18.1414180000961; Fri, 24 Oct 2014 12:46:40 -0700 (PDT) Received: from fedora1.holmesfamily.ws ([98.221.136.245]) by mx.google.com with ESMTPSA id p5sm4977789qah.3.2014.10.24.12.46.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Oct 2014 12:46:40 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Fri, 24 Oct 2014 15:46:33 -0400 Message-Id: <1414179993-12296-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: patch Subject: [lng-odp] [PATCH] odp_ring_test.c: free buffer on fail 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: mike.holmes@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.217.182 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 On data mismatch free the recently mallocked buffer. Signed-off-by: Mike Holmes Reviewed-by: Santosh Shukla --- test/api_test/odp_ring_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c index 1da5845..eb1f301 100644 --- a/test/api_test/odp_ring_test.c +++ b/test/api_test/odp_ring_test.c @@ -286,6 +286,7 @@ static int consumer_fn(void) if (i == 0) { for (i = 0; i < MAX_BULK; i++) { if (src[i] != (void *)(unsigned long)i) { + free(src); printf("data mismatch.. lockless ops fail\n"); return -1; }