aboutsummaryrefslogtreecommitdiff
path: root/src/Main.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 7c98c956..9b6630d6 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -243,16 +243,17 @@ glue_state_file_init(GError **error_r)
Path path_fs = Path::FromUTF8(path);
- g_free(path);
-
if (path_fs.IsNull()) {
+ g_free(path);
g_set_error(error_r, main_quark(), 0,
"Failed to convert state file path to FS encoding");
return false;
}
- state_file = new StateFile(std::move(path_fs),
+ state_file = new StateFile(std::move(path_fs), path,
*global_partition, *main_loop);
+ g_free(path);
+
state_file->Read();
return true;
}