From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EB9FB1395E2 for ; Sun, 27 Nov 2016 01:50:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A461BE0810; Sun, 27 Nov 2016 01:50:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6D16DE0810 for ; Sun, 27 Nov 2016 01:50:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 05DA634121E for ; Sun, 27 Nov 2016 01:50:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6F8E049A for ; Sun, 27 Nov 2016 01:50:45 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1480211436.e61179d1b30ac9b95d85788c320b6cfcb567171a.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: main.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: e61179d1b30ac9b95d85788c320b6cfcb567171a X-VCS-Branch: master Date: Sun, 27 Nov 2016 01:50:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 740b3edd-c25d-4bbf-a380-b1fbe69e3a45 X-Archives-Hash: 544e778ab8da4a2d54de448a0f1f66dc commit: e61179d1b30ac9b95d85788c320b6cfcb567171a Author: Mike Frysinger gentoo org> AuthorDate: Sun Nov 27 01:50:36 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Nov 27 01:50:36 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e61179d1 cache: fix fclose(NULL) error when cache reading fails main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index ff7648d..b99768d 100644 --- a/main.c +++ b/main.c @@ -1303,7 +1303,7 @@ portage_cache *cache_read_file_md5(const char *file) return ret; err: - fclose(f); + if (f) fclose(f); if (ret) cache_free(ret); return NULL; }