diff options
Diffstat (limited to 'src/tokenizer.cpp')
| -rw-r--r-- | src/tokenizer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 556da7c4c..814e418aa 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -805,8 +805,7 @@ void init_tokenizer_with_data(Tokenizer *t, String const &fullpath, void *data, TokenizerInitError init_tokenizer_from_fullpath(Tokenizer *t, String const &fullpath, TokenizerFlags flags = TokenizerFlag_None) { TokenizerInitError err = TokenizerInit_None; - char *c_str = alloc_cstring(heap_allocator(), fullpath); - defer (gb_free(heap_allocator(), c_str)); + char *c_str = alloc_cstring(temporary_allocator(), fullpath); // TODO(bill): Memory map rather than copy contents gbFileContents fc = gb_file_read_contents(heap_allocator(), true, c_str); |