X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fopen.cc;h=dc191d64aad0489890aed9bc0af10fd50f7ea8a5;hb=a6a580e61613507edc47e0eac0b2b84f6678d01c;hp=8f572b0b4f5557a43e7ab516edbaf39580e75173;hpb=a7873df331bcd53dd1bc8da95c4279163437cc13;p=notmuch diff --git a/lib/open.cc b/lib/open.cc index 8f572b0b..dc191d64 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -280,6 +280,9 @@ _notmuch_choose_xapian_path (void *ctx, const char *database_path, if (status != NOTMUCH_STATUS_PATH_ERROR) goto DONE; + if (*message_ptr) + free (*message_ptr); + notmuch_path = talloc_asprintf (ctx, "%s/.notmuch", database_path); status = _db_dir_exists (notmuch_path, message_ptr); if (status) @@ -648,6 +651,9 @@ notmuch_database_create_with_config (const char *database_path, goto DONE; } + if (message) + free (message); + status = _finish_open (notmuch, profile, NOTMUCH_DATABASE_MODE_READ_WRITE,