uci: properly close input before exit
[project/uci.git] / cli.c
diff --git a/cli.c b/cli.c
index 557472e..e1e0a66 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;
                                }