X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-dump.c;h=37432142761216e4a87494c3ac57bf79ad207c99;hp=a73587562fb9ce929e78807ec46fc8a97e5df087;hb=b9520ef033ea9ae54507f94f7258641a6a1ad2e6;hpb=7ced2e32d1612aa5eb154b31705236f2483f364e diff --git a/notmuch-dump.c b/notmuch-dump.c index a7358756..37432142 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -36,9 +36,8 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) if (config == NULL) return 1; - notmuch = notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_ONLY); - if (notmuch == NULL) + if (notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READ_ONLY, ¬much)) return 1; char *output_file_name = NULL; @@ -116,7 +115,7 @@ notmuch_dump_command (unused (void *ctx), int argc, char *argv[]) fclose (output); notmuch_query_destroy (query); - notmuch_database_close (notmuch); + notmuch_database_destroy (notmuch); return 0; }