summaryrefslogtreecommitdiffstats
path: root/c/src/exec/libcsupport/src/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/libcsupport/src/link.c')
-rw-r--r--c/src/exec/libcsupport/src/link.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/c/src/exec/libcsupport/src/link.c b/c/src/exec/libcsupport/src/link.c
index 5bf8f90353..03bdaee343 100644
--- a/c/src/exec/libcsupport/src/link.c
+++ b/c/src/exec/libcsupport/src/link.c
@@ -41,8 +41,16 @@ int link(
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
+
+ if ( !parent_loc.ops->evalformake ) {
+ rtems_filesystem_freenode( &existing_loc );
+ rtems_filesystem_freenode( &parent_loc );
+ set_errno_and_return_minus_one( ENOTSUP );
+ }
+
result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
+ rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
set_errno_and_return_minus_one( result );
}