_trial_open can't know if the PATH_ERROR return value will cause the
error message to be returned from the library, so it's up the caller
to clean up if not.
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)
goto DONE;
}
+ if (message)
+ free (message);
+
status = _finish_open (notmuch,
profile,
NOTMUCH_DATABASE_MODE_READ_WRITE,