diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-12-28 14:28:47 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-12-28 14:28:47 +0000 |
commit | b24f453a7d19181b1c9ee2909b66e6c3aa1f6fa1 (patch) | |
tree | 273057826bcc5c411d63bc6032d250527d8a8792 /src | |
parent | d495a881f3c277abd4a49fe9b3d5d2788ee4c92b (diff) | |
download | uboxlib-dos-b24f453a7d19181b1c9ee2909b66e6c3aa1f6fa1.tar.gz uboxlib-dos-b24f453a7d19181b1c9ee2909b66e6c3aa1f6fa1.zip |
Close the file after successful read
Diffstat (limited to 'src')
-rw-r--r-- | src/assets.c | 1 |
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; } |