diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-09-08 23:16:07 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-09-08 23:16:07 +0200 |
commit | faa1a1910f032c6c3bbc7b8da36332c3f8f434d0 (patch) | |
tree | fb21ea692dc248a423b377756f32729884700e25 /lib | |
parent | a0171d56898234980f0694d87f0ef5528243b8b0 (diff) |
fs: fix crash when closing file handle twice
We need to clear the file handle pointer after closing the file
to avoid invoking the dtor later.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -58,7 +58,7 @@ ut_fs_close(struct ut_state *s, uint32_t off, struct json_object *args) err_return(EBADF); fclose(*fp); - //*fp = NULL; + *fp = NULL; return json_object_new_boolean(true); } |