X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-reply.c;h=7184a5dfcf887bb6fcb81bc8f1ee63171f7bb286;hp=0949d9fdc23eb5517695a10c352eabce9a66bf7b;hb=393afbfa6133137f2e6f43e864b09fca0f2c6957;hpb=4ba18958b5fed52598044286e87ebb3f291e4277 diff --git a/notmuch-reply.c b/notmuch-reply.c index 0949d9fd..7184a5df 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -740,9 +740,8 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) 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; query = notmuch_query_create (notmuch, query_string); @@ -755,7 +754,7 @@ notmuch_reply_command (void *ctx, int argc, char *argv[]) return 1; notmuch_query_destroy (query); - notmuch_database_close (notmuch); + notmuch_database_destroy (notmuch); if (params.cryptoctx) g_object_unref(params.cryptoctx);