diff options
| author | avanspector <avanspector@gmail.com> | 2024-02-27 02:38:06 +0100 |
|---|---|---|
| committer | avanspector <avanspector@gmail.com> | 2024-02-27 02:38:06 +0100 |
| commit | fca691a06619a543b43e1aefd65881f27f4c6678 (patch) | |
| tree | ad006f8455b63b431686a077a0794439c2adef85 /src/build_settings.cpp | |
| parent | 38c69b96914e10d54e7765a3cbe542a620a7e49a (diff) | |
fix core:thread and a memory leak
in the future probably native non-pthread implementation for haiku will be required
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index f66cd278a..fdaa971f1 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -898,6 +898,7 @@ gb_internal String internal_odin_root_dir(void) { } auto path_buf = array_make<char>(heap_allocator(), 300); + defer (array_free(&path_buf)); len = 0; for (;;) { @@ -930,9 +931,6 @@ gb_internal String internal_odin_root_dir(void) { global_module_path = path; global_module_path_set = true; - - // array_free(&path_buf); - return path; } @@ -952,6 +950,7 @@ gb_internal String internal_odin_root_dir(void) { } auto path_buf = array_make<char>(heap_allocator(), 300); + defer (array_free(&path_buf)); len = 0; for (;;) { @@ -984,9 +983,6 @@ gb_internal String internal_odin_root_dir(void) { global_module_path = path; global_module_path_set = true; - - // array_free(&path_buf); - return path; } #else |