X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-tag.c;h=7d186399ba786149d607ca2b45837836a43af802;hp=05feed3e97a461f7201ca0b2d0664cc5e3743586;hb=1dc7e66ee7186679e7669f045a4d787f36d26860;hpb=9605e62099b8c5d9e1debc27b31ae1e256703a3b diff --git a/notmuch-tag.c b/notmuch-tag.c index 05feed3e..7d186399 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -229,16 +229,15 @@ notmuch_tag_command (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_WRITE); - if (notmuch == NULL) + if (notmuch_database_open (notmuch_config_get_database_path (config), + NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much)) return 1; synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config); ret = tag_query (ctx, notmuch, query_string, tag_ops, synchronize_flags); - notmuch_database_close (notmuch); + notmuch_database_destroy (notmuch); return ret; }