From patchwork Wed Mar 4 03:36:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 446050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 65CD51401D0 for ; Wed, 4 Mar 2015 14:36:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=neutral reason="verification failed; unprotected key/testing" header.d=jms.id.au header.i=@jms.id.au header.b=dxC0+ZXp; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40F261A0244 for ; Wed, 4 Mar 2015 14:36:43 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=neutral reason="verification failed; unprotected key/testing" header.d=jms.id.au header.i=@jms.id.au header.b=dxC0+ZXp; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pd0-x230.google.com (mail-pd0-x230.google.com [IPv6:2607:f8b0:400e:c02::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id C134F1A0006 for ; Wed, 4 Mar 2015 14:36:36 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass reason="1024-bit key; unprotected key/testing" header.d=jms.id.au header.i=@jms.id.au header.b=dxC0+ZXp; dkim-adsp=pass; dkim-atps=neutral Received: by pdjy10 with SMTP id y10so53718492pdj.13 for ; Tue, 03 Mar 2015 19:36:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=from:to:subject:date:message-id; bh=yB6Ci+72nsE2iMBc43UpVcXf9fgTXe0NM71h6t+t4f0=; b=dxC0+ZXpZ8PpEbFzA+IUcJDZ/lrN5vfF21V4JV6bce9F4IIXCnZyZodjuTe8leh/Ll W4TqLT74icH6q+DLR7J0tzGKiWB3cjGlKvkYnv8DSV7ZvbkmMj5FyVMu/4XevgbUeUW1 4KHzW0Q9SOFy6JEEOVdUa1TA8uHpUUqpeNbtQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=yB6Ci+72nsE2iMBc43UpVcXf9fgTXe0NM71h6t+t4f0=; b=g/LTJVM1b4ldkmT5GG5ZQBWYNCN6+zzaRV+oHGyf6M8SAGoFSE8eBBq3N8aNGMzMBa U/SBIVBkzUFw3FqzDURRKFpr7Ar9Xl6A5XeiB3faroq8H1eueMKEzLCBh3F+nRNzo9Or mRTubIsqIMj9RPJV5EVtMLb54B5qdqfqqy8cOd3bphRL206MF6VI29i/oa48NGDCDj+O lV44d4eV6LScdqOuH3FpJ+MZ85aYaSoz0SUcKElAm9b9R2lEmJLu3mQ+4lzLxfbtW4iN GrFjBrHIwvube54NIbF0XposVJgTaZxVWKIV4v+iv3FjMB080EaNhSnttOf9rME6E2Ik dKDw== X-Gm-Message-State: ALoCoQkOMdlxtD9SbcFT//Hw5Vko77gRVxMQReqglw+zSVGJI2ElvR0Hf+wBXSwgvpLu9CzA62rR X-Received: by 10.68.183.67 with SMTP id ek3mr2978166pbc.145.1425440194626; Tue, 03 Mar 2015 19:36:34 -0800 (PST) Received: from icarus.au.ibm.com (220-244-113-206.static.tpgi.com.au. [220.244.113.206]) by mx.google.com with ESMTPSA id lg8sm2336879pbc.55.2015.03.03.19.36.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Mar 2015 19:36:33 -0800 (PST) From: Joel Stanley To: skiboot@lists.ozlabs.org Date: Wed, 4 Mar 2015 14:06:22 +1030 Message-Id: <1425440184-32398-1-git-send-email-joel@jms.id.au> X-Mailer: git-send-email 2.1.4 Subject: [Skiboot] [PATCH] libflash: Ensure temporary buffer is freed X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Joel Stanley --- libflash/libflash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libflash/libflash.c b/libflash/libflash.c index 8be73b2..2886fc7 100644 --- a/libflash/libflash.c +++ b/libflash/libflash.c @@ -174,7 +174,7 @@ int flash_read_corrected(struct flash_chip *c, uint32_t pos, void *buf, pos += ECC_BUFFER_SIZE(copylen); } - return 0; + rc = 0; err: free(bufecc);