diff options
author | David Bremner <david@tethera.net> | 2017-08-26 11:41:38 -0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2017-08-30 07:10:07 -0300 |
commit | c960bb4686429b220419f6d45ede920d6c14c3c5 (patch) | |
tree | 75068b97425e4f8b27f5e8d9db2b5cec07968f1f /notmuch-count.c | |
parent | af64530d3f93dd1c379ad3ba93608ca5ad700598 (diff) |
cppcheck: close files during shutdown
Fix the following cppcheck errors:
notmuch-count.c:207: error: Resource leak: input
notmuch-tag.c:238: error: Resource leak: input
We know that the program is shutting down here, but it does no harm to
clean up a bit.
Diffstat (limited to 'notmuch-count.c')
-rw-r--r-- | notmuch-count.c | 2 |
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; } |