diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-05 17:52:33 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-05 17:52:33 -0400 |
| commit | 398d2cab6988e20c59e7037ff7ef551540339abb (patch) | |
| tree | 8c5154cfcd32d0664fd40ac8fa93f50f6434859a /src/stdlib/paths.c | |
| parent | 9b5b6b110bb80f8530dd7ca4e0cc9eb3236d8ad7 (diff) | |
Fix a bunch of issues with optional types
Diffstat (limited to 'src/stdlib/paths.c')
| -rw-r--r-- | src/stdlib/paths.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c index d630ad7d..74526f7d 100644 --- a/src/stdlib/paths.c +++ b/src/stdlib/paths.c @@ -690,10 +690,11 @@ OptionalClosure_t Path$by_line(Path_t path) { // be closed by GC finalizers. GC_gcollect(); f = fopen(path_str, "r"); - if (f == NULL) return NONE_CLOSURE; } } + if (f == NULL) return NONE_CLOSURE; + FILE **wrapper = GC_MALLOC(sizeof(FILE *)); *wrapper = f; GC_register_finalizer(wrapper, (void *)_line_reader_cleanup, NULL, NULL, NULL); |
