This better matches the memory allocation semantics in
notmuch_database_open_with_config.
GKeyFile *key_file = NULL;
struct stat st;
int err;
GKeyFile *key_file = NULL;
struct stat st;
int err;
+ void *local = talloc_new (NULL);
if ((status = _choose_database_path (config_path, profile, &key_file, &database_path, &message)))
goto DONE;
if ((status = _choose_database_path (config_path, profile, &key_file, &database_path, &message)))
goto DONE;
- notmuch_path = talloc_asprintf (NULL, "%s/%s", database_path, ".notmuch");
+ notmuch_path = talloc_asprintf (local, "%s/%s", database_path, ".notmuch");
err = mkdir (notmuch_path, 0755);
if (err) {
err = mkdir (notmuch_path, 0755);
if (err) {
- if (notmuch_path)
- talloc_free (notmuch_path);
if (message) {
if (status_string)
if (message) {
if (status_string)