uci: properly close input before exit
authorHans Dedecker <dedeckeh@gmail.com>
Tue, 28 Apr 2015 14:07:27 +0000 (16:07 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 8 May 2015 10:06:05 +0000 (12:06 +0200)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
cli.c

diff --git a/cli.c b/cli.c
index 557472ecf42100e9bf6d9eee52a1ef9b66f308c3..e1e0a66a9b0c62c812a0abc8b12f725357816a50 100644 (file)
--- 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;
                                }