]> git.cworth.org Git - notmuch/blobdiff - lib/open.cc
lib: clear error message on success in _choose_database_path
[notmuch] / lib / open.cc
index 005872dc2c5877d5f0ac483b0ef2cec19b2ca85c..463e38bf0d8f733fe933da033ab993d828255fb7 100644 (file)
@@ -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;
 }