summaryrefslogtreecommitdiffstats
path: root/notmuch-count.c
diff options
context:
space:
mode:
Diffstat (limited to 'notmuch-count.c')
-rw-r--r--notmuch-count.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/notmuch-count.c b/notmuch-count.c
index 50b0c193..97281374 100644
--- a/notmuch-count.c
+++ b/notmuch-count.c
@@ -204,6 +204,8 @@ notmuch_count_command (notmuch_config_t *config, int argc, char *argv[])
if (batch && opt_index != argc) {
fprintf (stderr, "--batch and query string are not compatible\n");
+ if (input)
+ fclose (input);
return EXIT_FAILURE;
}