posix: fs: ZFD_IOCTL_CLOSE: Be sure to call posix_fs_free_obj()

To make sure that entry in fs.c:desc_array[] is freed. Note that
freeing an entry in fdtable is handled by generic implementation
of close().

Fixes: #17231

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2019-08-21 11:14:17 +03:00 committed by Anas Nashif
commit 6c5a08899a

View file

@ -102,6 +102,7 @@ static int fs_ioctl_vmeth(void *obj, unsigned int request, va_list args)
switch (request) {
case ZFD_IOCTL_CLOSE:
rc = fs_close(&ptr->file);
posix_fs_free_obj(ptr);
break;
case ZFD_IOCTL_LSEEK: {