From patchwork Tue Aug 28 01:48:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honggang LI X-Patchwork-Id: 10577745 X-Patchwork-Delegate: hal@mellanox.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64B6F1390 for ; Tue, 28 Aug 2018 01:49:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55A9F29A22 for ; Tue, 28 Aug 2018 01:49:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4997D29A20; Tue, 28 Aug 2018 01:49:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A9CE299F1 for ; Tue, 28 Aug 2018 01:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbeH1FiO (ORCPT ); Tue, 28 Aug 2018 01:38:14 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47116 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725724AbeH1FiN (ORCPT ); Tue, 28 Aug 2018 01:38:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D1A440006EC; Tue, 28 Aug 2018 01:48:59 +0000 (UTC) Received: from lhg.nay.redhat.com (unknown [10.66.129.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF88A2166B41; Tue, 28 Aug 2018 01:48:57 +0000 (UTC) From: Honggang LI To: hal@dev.mellanox.co.il Cc: linux-rdma@vger.kernel.org, Honggang Li Subject: [PATCH 2/5] osmtest.c: osmtest_create_inventory_file close fh before exit Date: Tue, 28 Aug 2018 09:48:31 +0800 Message-Id: <20180828014834.3046-2-honli@redhat.com> In-Reply-To: <20180828014834.3046-1-honli@redhat.com> References: <20180828014834.3046-1-honli@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 28 Aug 2018 01:48:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 28 Aug 2018 01:48:59 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'honli@redhat.com' RCPT:'' Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Honggang Li Signed-off-by: Honggang Li --- osmtest/osmtest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osmtest/osmtest.c b/osmtest/osmtest.c index 4ef78eb0..b7197bf3 100644 --- a/osmtest/osmtest.c +++ b/osmtest/osmtest.c @@ -2736,9 +2736,8 @@ osmtest_create_inventory_file(IN osmtest_t * const p_osmt) if (status != IB_SUCCESS) goto Exit; - fclose(fh); - Exit: + fclose(fh); OSM_LOG_EXIT(&p_osmt->log); return (status); }