summaryrefslogtreecommitdiff
path: root/src/util/file
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/file')
-rw-r--r--src/util/file/file_stdio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/file/file_stdio.c b/src/util/file/file_stdio.c
index 97dd0f0..fa74be7 100644
--- a/src/util/file/file_stdio.c
+++ b/src/util/file/file_stdio.c
@@ -49,6 +49,8 @@ bool nn_file_open(struct nn_file *file, str *path, s32 flags)
return false;
}
+ al_str_clone(&file->path, path);
+
return true;
}
@@ -112,6 +114,7 @@ void *nn_file_mmap(struct nn_file *file)
void nn_file_close(struct nn_file *file)
{
fclose(file->file);
+ al_str_free(&file->path);
}
bool nn_dir_open(struct nn_dir *dir, str *path) { (void)dir; (void)path; return false; }