[PATCH] cpukit/dosfs: Jump to correct error handler
Kinsey Moore
kinsey.moore at oarcorp.com
Tue Jan 2 22:01:57 UTC 2024
When encountering an error during filesystem creation, fat_fd must be
cleaned up appropriately once the file is opened. There was an
opportunity for a resource leak due to jumping to the incorrect error
handling label.
---
cpukit/libfs/src/dosfs/msdos_create.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/libfs/src/dosfs/msdos_create.c b/cpukit/libfs/src/dosfs/msdos_create.c
index 26df0451c9..f71969f787 100644
--- a/cpukit/libfs/src/dosfs/msdos_create.c
+++ b/cpukit/libfs/src/dosfs/msdos_create.c
@@ -202,7 +202,7 @@ msdos_creat_node(const rtems_filesystem_location_info_t *parent_loc,
fs_info->fat.vol.bpc,
&unused);
if (rc != RC_OK)
- goto err;
+ goto error;
/*
* dot and dotdot entries are identical to new node except the
--
2.39.2
More information about the devel
mailing list