aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-12-28 14:28:47 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-12-28 14:28:47 +0000
commitb24f453a7d19181b1c9ee2909b66e6c3aa1f6fa1 (patch)
tree273057826bcc5c411d63bc6032d250527d8a8792 /src
parentd495a881f3c277abd4a49fe9b3d5d2788ee4c92b (diff)
downloaduboxlib-dos-b24f453a7d19181b1c9ee2909b66e6c3aa1f6fa1.tar.gz
uboxlib-dos-b24f453a7d19181b1c9ee2909b66e6c3aa1f6fa1.zip
Close the file after successful read
Diffstat (limited to 'src')
-rw-r--r--src/assets.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/assets.c b/src/assets.c
index 8c14a49..870b308 100644
--- a/src/assets.c
+++ b/src/assets.c
@@ -58,6 +58,7 @@ uint8_t ubox_assets_read(const char *name, uint8_t **data, size_t *data_size)
if (fread(*data, 1, *data_size, fd) == *data_size)
{
UBOX_DEBUG_LOG("%s: %li bytes\n", buff, *data_size);
+ fclose(fd);
return 1;
}