hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 039ee8db7ace84780f9b01b12ad4ce1f38daa04f
parent 2bce15db8ba2f3c6711fab3d34bd34f00b6be6b1
Author: Ember Sawady <ecs@d2evs.net>
Date:   Wed, 11 Oct 2023 00:34:02 +0000

temp::file: get rid of an invalid free

probably a leftover from before path:: overhaul

Signed-off-by: Ember Sawady <ecs@d2evs.net>

Diffstat:
Mtemp/+linux.ha | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/temp/+linux.ha b/temp/+linux.ha @@ -30,9 +30,7 @@ export fn file(iomode: io::mode, mode: fs::mode) (io::file | fs::error) = { // TODO: Add a custom "close" function which removes the named file match (os::create(get_tmpdir(), mode, oflags)) { case let err: fs::error => - let file = named(os::cwd, get_tmpdir(), iomode, mode...)?; - free(file.1); - return file.0; + return named(os::cwd, get_tmpdir(), iomode, mode...)?.0; case let f: io::file => return f; };