Use notmuch_database_destroy instead of notmuch_database_close
[notmuch] / notmuch-new.c
index 473201e961cdb61fe51c1807a18b4161d3615f48..3ff630478c613848f342ddbdb42fa625484254d0 100644 (file)
@@ -1041,7 +1041,7 @@ notmuch_new_command (void *ctx, int argc, char *argv[])
        fprintf (stderr, "Note: A fatal error was encountered: %s\n",
                 notmuch_status_to_string (ret));
 
-    notmuch_database_close (notmuch);
+    notmuch_database_destroy (notmuch);
 
     if (run_hooks && !ret && !interrupted)
        ret = notmuch_run_hook (db_path, "post-new");