summaryrefslogtreecommitdiff
path: root/platform/x11/godot_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/godot_x11.cpp')
-rw-r--r--platform/x11/godot_x11.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/x11/godot_x11.cpp b/platform/x11/godot_x11.cpp
index 6f418b213f..f02f3cb881 100644
--- a/platform/x11/godot_x11.cpp
+++ b/platform/x11/godot_x11.cpp
@@ -45,8 +45,10 @@ int main(int argc, char *argv[]) {
getcwd(cwd, PATH_MAX);
Error err = Main::setup(argv[0], argc - 1, &argv[1]);
- if (err != OK)
+ if (err != OK) {
+ free(cwd);
return 255;
+ }
if (Main::start())
os.run(); // it is actually the OS that decides how to run