From patchwork Tue Apr 28 14:07:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 465563 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EE3B314007D for ; Wed, 29 Apr 2015 00:07:47 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=P3RsG17N; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id DFFFB28BB55; Tue, 28 Apr 2015 16:06:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D449228BB55 for ; Tue, 28 Apr 2015 16:06:29 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 28 Apr 2015 16:06:28 +0200 (CEST) Received: by widdi4 with SMTP id di4so141828802wid.0 for ; Tue, 28 Apr 2015 07:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=N+PidLG6mMyy2kqz+gZlzXnu1kexLzvogbHhqwdBZtE=; b=P3RsG17NExNnjdj1bgY1THlTLGzU4Zw94kB0ZyPqfRH/04LF1aOnkPCNXD6CauzTkZ KnVPTJuJd7XOO2EjIew/FbI5Ya9yaUwg2DjpnX1xgCyWQl6YadmaH8gqL5b865ZHatnv U8fq4fR+5DmsJK/rKScEPwNP3hczjTCqdCZ8nbb7rn+i8Wh7hp22+Hnq3UJwre1UsQfv RJPeYPWHmUzFZbbZm5gC4z/2JM7Xm7qgVIRnUrjNjq3hkiTfrwXV5694a5z7HjOHrXaW Pwh7gVAC/AH5ww6Z3DX6yk0Mw3b0tyPdQRvhwE6l47TQk9tSS4cZza1nJneQ8hQgoZRi AGLg== X-Received: by 10.194.63.225 with SMTP id j1mr33184622wjs.120.1430230051631; Tue, 28 Apr 2015 07:07:31 -0700 (PDT) Received: from cplx43.eu.thmulti.com ([141.11.62.7]) by mx.google.com with ESMTPSA id n3sm16722590wix.1.2015.04.28.07.07.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Apr 2015 07:07:30 -0700 (PDT) From: Hans Dedecker To: openwrt-devel@lists.openwrt.org Date: Tue, 28 Apr 2015 16:07:27 +0200 Message-Id: <1430230048-13193-1-git-send-email-dedeckeh@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Hans Dedecker , cyrus@openwrt.org Subject: [OpenWrt-Devel] [PATCH] uci: properly close input before exit X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Hans Dedecker --- cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cli.c b/cli.c index 557472e..e1e0a66 100644 --- a/cli.c +++ b/cli.c @@ -687,6 +687,7 @@ int main(int argc, char **argv) break; case 'f': if (input != stdin) { + fclose(input); perror("uci"); return 1; }