[PATCH] libcsupport/mount: Return the error correctly

chrisj at rtems.org chrisj at rtems.org
Sat Sep 18 05:18:11 UTC 2021


From: Chris Johns <chrisj at rtems.org>

Closes #4507
---
 cpukit/libcsupport/src/mount.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c
index a4f6423c03..2caa8099c1 100644
--- a/cpukit/libcsupport/src/mount.c
+++ b/cpukit/libcsupport/src/mount.c
@@ -219,6 +219,8 @@ int mount(
 
         if ( rv != 0 ) {
           free( mt_entry );
+          errno = rv;
+          rv = -1;
         }
       } else {
         errno = ENOMEM;
-- 
2.24.1



More information about the devel mailing list