X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lib%2Fopen.cc;h=463e38bf0d8f733fe933da033ab993d828255fb7;hb=HEAD;hp=54d1faf30127c8a72f3c96e838cf9d4edba7e70a;hpb=3f5809bf28becbddfed9ff33d6f1242346904c23;p=notmuch diff --git a/lib/open.cc b/lib/open.cc index 54d1faf3..463e38bf 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -249,6 +249,11 @@ _choose_database_path (notmuch_database_t *notmuch, return NOTMUCH_STATUS_NO_DATABASE; } + if (*message) { + free (*message); + *message = NULL; + } + return NOTMUCH_STATUS_SUCCESS; } @@ -555,7 +560,7 @@ _finish_open (notmuch_database_t *notmuch, goto DONE; if (key_file) - status = _notmuch_config_load_from_file (notmuch, key_file); + status = _notmuch_config_load_from_file (notmuch, key_file, &message); if (status) goto DONE; @@ -961,7 +966,7 @@ notmuch_database_load_config (const char *database_path, } if (key_file) { - status = _notmuch_config_load_from_file (notmuch, key_file); + status = _notmuch_config_load_from_file (notmuch, key_file, &message); if (status) goto DONE; }