Index: c/src/exec/libcsupport/src/mount.c
===================================================================
--- c/src/exec/libcsupport/src/mount.c	(revision 72d3f610f4545387652a27621cbb2daf615c1095)
+++ c/src/exec/libcsupport/src/mount.c	(revision 04df848c650ae9701bba83307d638b1e38db3b1b)
@@ -96,4 +96,5 @@
   rtems_filesystem_location_info_t      loc;
   rtems_filesystem_mount_table_entry_t *temp_mt_entry;
+  rtems_filesystem_location_info_t     *loc_to_free = NULL;
 
 /* XXX add code to check for required operations */
@@ -142,81 +143,82 @@
 
   if ( mount_point ) {
-     if ( rtems_filesystem_evaluate_path( 
-       mount_point, 
-       RTEMS_LIBIO_PERMS_RWX,
-       &loc,
-       TRUE ) == -1 )
-       goto cleanup_and_bail;
-
-     /* 
-      * Test to see if it is a directory
-      */
-
-     if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
-       errno = ENOTDIR;
-       goto cleanup_and_bail;
-     }
-
-     /*
-      *  You can only mount one file system onto a single mount point.
-      */
-
-     if ( search_mt_for_mount_point( &loc ) == FOUND ) {
-       errno = EBUSY;
-       goto cleanup_and_bail;
-     }
+
+    if ( rtems_filesystem_evaluate_path( 
+            mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )
+      goto cleanup_and_bail;
+
+    /* 
+     *  Test to see if it is a directory
+     */
+
+    loc_to_free = &loc;
+    if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
+      errno = ENOTDIR;
+      goto cleanup_and_bail;
+    }
+
+    /*
+     *  You can only mount one file system onto a single mount point.
+     */
+
+    if ( search_mt_for_mount_point( &loc ) == FOUND ) {
+      errno = EBUSY;
+      goto cleanup_and_bail;
+    }
  
-     /*
-      * This must be a good mount point, so move the location information
-      * into the allocated mount entry
-      */
-
-     temp_mt_entry->mt_point_node.node_access = loc.node_access;
-     temp_mt_entry->mt_point_node.handlers = loc.handlers;
-     temp_mt_entry->mt_point_node.ops = loc.ops;
-     temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
-
-     /* 
-      * This link to the parent is only done when we are dealing with system 
-      * below the base file system 
-      */
-
-     if ( !loc.ops->mount ){
-       errno = ENOTSUP;
-       goto cleanup_and_bail;
-     }
-
-     if ( loc.ops->mount( temp_mt_entry ) ) {
-        goto cleanup_and_bail;
-     }
-  }
-  else {
-
-     /* 
-      * This is a mount of the base file system --> The 
-      * mt_point_node.node_access will be set to null to indicate that this 
-      * is the root of the entire file system.
-      */
-
-      temp_mt_entry->mt_fs_root.node_access = NULL;
-      temp_mt_entry->mt_fs_root.handlers = NULL;
-      temp_mt_entry->mt_fs_root.ops = NULL;
-
-      temp_mt_entry->mt_point_node.node_access = NULL;
-      temp_mt_entry->mt_point_node.handlers = NULL;
-      temp_mt_entry->mt_point_node.ops = NULL;
-      temp_mt_entry->mt_point_node.mt_entry = NULL;
+    /*
+     *  This must be a good mount point, so move the location information
+     *  into the allocated mount entry.  Note:  the information that
+     *  may have been allocated in loc should not be sent to freenode 
+     *  until the system is unmounted.  It may be needed to correctly
+     *  traverse the tree.
+     */
+
+    temp_mt_entry->mt_point_node.node_access = loc.node_access;
+    temp_mt_entry->mt_point_node.handlers = loc.handlers;
+    temp_mt_entry->mt_point_node.ops = loc.ops;
+    temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
+
+    /* 
+     *  This link to the parent is only done when we are dealing with system 
+     *  below the base file system 
+     */
+
+    if ( !loc.ops->mount ){
+      errno = ENOTSUP;
+      goto cleanup_and_bail;
+    }
+
+    if ( loc.ops->mount( temp_mt_entry ) ) {
+      goto cleanup_and_bail;
+    }
+  } else {
+
+    /* 
+     *  This is a mount of the base file system --> The 
+     *  mt_point_node.node_access will be set to null to indicate that this 
+     *  is the root of the entire file system.
+     */
+
+    temp_mt_entry->mt_fs_root.node_access = NULL;
+    temp_mt_entry->mt_fs_root.handlers = NULL;
+    temp_mt_entry->mt_fs_root.ops = NULL;
+
+    temp_mt_entry->mt_point_node.node_access = NULL;
+    temp_mt_entry->mt_point_node.handlers = NULL;
+    temp_mt_entry->mt_point_node.ops = NULL;
+    temp_mt_entry->mt_point_node.mt_entry = NULL;
   }
 
   if ( !fs_ops->fsmount_me ){
-      errno = ENOTSUP;
-      goto cleanup_and_bail;
+    errno = ENOTSUP;
+    goto cleanup_and_bail;
   }
 
   if ( fs_ops->fsmount_me( temp_mt_entry ) )
-      goto cleanup_and_bail;
-
-  /*
-   * Add the mount table entry to the mount table chain 
+    goto cleanup_and_bail;
+
+  /*
+   *  Add the mount table entry to the mount table chain 
    */
 
@@ -225,14 +227,13 @@
   *mt_entry = temp_mt_entry;
 
-  rtems_filesystem_freenode( &loc );
+  return 0;
+
+cleanup_and_bail:
+
+  free( temp_mt_entry );
   
-  return 0;
-
-cleanup_and_bail:
-
-  free( temp_mt_entry );
-
-  rtems_filesystem_freenode( &loc );
-  
+  if ( loc_to_free )
+    rtems_filesystem_freenode( loc_to_free );
+
   return -1;
 }
Index: c/src/exec/libcsupport/src/unmount.c
===================================================================
--- c/src/exec/libcsupport/src/unmount.c	(revision 72d3f610f4545387652a27621cbb2daf615c1095)
+++ c/src/exec/libcsupport/src/unmount.c	(revision 04df848c650ae9701bba83307d638b1e38db3b1b)
@@ -138,4 +138,5 @@
    */
 
+  rtems_filesystem_freenode( &temp_loc.mt_entry->mt_point_node );
   free( temp_loc.mt_entry );
   rtems_filesystem_freenode( &temp_loc );
Index: c/src/lib/libc/mount.c
===================================================================
--- c/src/lib/libc/mount.c	(revision 72d3f610f4545387652a27621cbb2daf615c1095)
+++ c/src/lib/libc/mount.c	(revision 04df848c650ae9701bba83307d638b1e38db3b1b)
@@ -96,4 +96,5 @@
   rtems_filesystem_location_info_t      loc;
   rtems_filesystem_mount_table_entry_t *temp_mt_entry;
+  rtems_filesystem_location_info_t     *loc_to_free = NULL;
 
 /* XXX add code to check for required operations */
@@ -142,81 +143,82 @@
 
   if ( mount_point ) {
-     if ( rtems_filesystem_evaluate_path( 
-       mount_point, 
-       RTEMS_LIBIO_PERMS_RWX,
-       &loc,
-       TRUE ) == -1 )
-       goto cleanup_and_bail;
-
-     /* 
-      * Test to see if it is a directory
-      */
-
-     if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
-       errno = ENOTDIR;
-       goto cleanup_and_bail;
-     }
-
-     /*
-      *  You can only mount one file system onto a single mount point.
-      */
-
-     if ( search_mt_for_mount_point( &loc ) == FOUND ) {
-       errno = EBUSY;
-       goto cleanup_and_bail;
-     }
+
+    if ( rtems_filesystem_evaluate_path( 
+            mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )
+      goto cleanup_and_bail;
+
+    /* 
+     *  Test to see if it is a directory
+     */
+
+    loc_to_free = &loc;
+    if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
+      errno = ENOTDIR;
+      goto cleanup_and_bail;
+    }
+
+    /*
+     *  You can only mount one file system onto a single mount point.
+     */
+
+    if ( search_mt_for_mount_point( &loc ) == FOUND ) {
+      errno = EBUSY;
+      goto cleanup_and_bail;
+    }
  
-     /*
-      * This must be a good mount point, so move the location information
-      * into the allocated mount entry
-      */
-
-     temp_mt_entry->mt_point_node.node_access = loc.node_access;
-     temp_mt_entry->mt_point_node.handlers = loc.handlers;
-     temp_mt_entry->mt_point_node.ops = loc.ops;
-     temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
-
-     /* 
-      * This link to the parent is only done when we are dealing with system 
-      * below the base file system 
-      */
-
-     if ( !loc.ops->mount ){
-       errno = ENOTSUP;
-       goto cleanup_and_bail;
-     }
-
-     if ( loc.ops->mount( temp_mt_entry ) ) {
-        goto cleanup_and_bail;
-     }
-  }
-  else {
-
-     /* 
-      * This is a mount of the base file system --> The 
-      * mt_point_node.node_access will be set to null to indicate that this 
-      * is the root of the entire file system.
-      */
-
-      temp_mt_entry->mt_fs_root.node_access = NULL;
-      temp_mt_entry->mt_fs_root.handlers = NULL;
-      temp_mt_entry->mt_fs_root.ops = NULL;
-
-      temp_mt_entry->mt_point_node.node_access = NULL;
-      temp_mt_entry->mt_point_node.handlers = NULL;
-      temp_mt_entry->mt_point_node.ops = NULL;
-      temp_mt_entry->mt_point_node.mt_entry = NULL;
+    /*
+     *  This must be a good mount point, so move the location information
+     *  into the allocated mount entry.  Note:  the information that
+     *  may have been allocated in loc should not be sent to freenode 
+     *  until the system is unmounted.  It may be needed to correctly
+     *  traverse the tree.
+     */
+
+    temp_mt_entry->mt_point_node.node_access = loc.node_access;
+    temp_mt_entry->mt_point_node.handlers = loc.handlers;
+    temp_mt_entry->mt_point_node.ops = loc.ops;
+    temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
+
+    /* 
+     *  This link to the parent is only done when we are dealing with system 
+     *  below the base file system 
+     */
+
+    if ( !loc.ops->mount ){
+      errno = ENOTSUP;
+      goto cleanup_and_bail;
+    }
+
+    if ( loc.ops->mount( temp_mt_entry ) ) {
+      goto cleanup_and_bail;
+    }
+  } else {
+
+    /* 
+     *  This is a mount of the base file system --> The 
+     *  mt_point_node.node_access will be set to null to indicate that this 
+     *  is the root of the entire file system.
+     */
+
+    temp_mt_entry->mt_fs_root.node_access = NULL;
+    temp_mt_entry->mt_fs_root.handlers = NULL;
+    temp_mt_entry->mt_fs_root.ops = NULL;
+
+    temp_mt_entry->mt_point_node.node_access = NULL;
+    temp_mt_entry->mt_point_node.handlers = NULL;
+    temp_mt_entry->mt_point_node.ops = NULL;
+    temp_mt_entry->mt_point_node.mt_entry = NULL;
   }
 
   if ( !fs_ops->fsmount_me ){
-      errno = ENOTSUP;
-      goto cleanup_and_bail;
+    errno = ENOTSUP;
+    goto cleanup_and_bail;
   }
 
   if ( fs_ops->fsmount_me( temp_mt_entry ) )
-      goto cleanup_and_bail;
-
-  /*
-   * Add the mount table entry to the mount table chain 
+    goto cleanup_and_bail;
+
+  /*
+   *  Add the mount table entry to the mount table chain 
    */
 
@@ -225,14 +227,13 @@
   *mt_entry = temp_mt_entry;
 
-  rtems_filesystem_freenode( &loc );
+  return 0;
+
+cleanup_and_bail:
+
+  free( temp_mt_entry );
   
-  return 0;
-
-cleanup_and_bail:
-
-  free( temp_mt_entry );
-
-  rtems_filesystem_freenode( &loc );
-  
+  if ( loc_to_free )
+    rtems_filesystem_freenode( loc_to_free );
+
   return -1;
 }
Index: c/src/lib/libc/unmount.c
===================================================================
--- c/src/lib/libc/unmount.c	(revision 72d3f610f4545387652a27621cbb2daf615c1095)
+++ c/src/lib/libc/unmount.c	(revision 04df848c650ae9701bba83307d638b1e38db3b1b)
@@ -138,4 +138,5 @@
    */
 
+  rtems_filesystem_freenode( &temp_loc.mt_entry->mt_point_node );
   free( temp_loc.mt_entry );
   rtems_filesystem_freenode( &temp_loc );
Index: cpukit/libcsupport/src/mount.c
===================================================================
--- cpukit/libcsupport/src/mount.c	(revision 72d3f610f4545387652a27621cbb2daf615c1095)
+++ cpukit/libcsupport/src/mount.c	(revision 04df848c650ae9701bba83307d638b1e38db3b1b)
@@ -96,4 +96,5 @@
   rtems_filesystem_location_info_t      loc;
   rtems_filesystem_mount_table_entry_t *temp_mt_entry;
+  rtems_filesystem_location_info_t     *loc_to_free = NULL;
 
 /* XXX add code to check for required operations */
@@ -142,81 +143,82 @@
 
   if ( mount_point ) {
-     if ( rtems_filesystem_evaluate_path( 
-       mount_point, 
-       RTEMS_LIBIO_PERMS_RWX,
-       &loc,
-       TRUE ) == -1 )
-       goto cleanup_and_bail;
-
-     /* 
-      * Test to see if it is a directory
-      */
-
-     if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
-       errno = ENOTDIR;
-       goto cleanup_and_bail;
-     }
-
-     /*
-      *  You can only mount one file system onto a single mount point.
-      */
-
-     if ( search_mt_for_mount_point( &loc ) == FOUND ) {
-       errno = EBUSY;
-       goto cleanup_and_bail;
-     }
+
+    if ( rtems_filesystem_evaluate_path( 
+            mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )
+      goto cleanup_and_bail;
+
+    /* 
+     *  Test to see if it is a directory
+     */
+
+    loc_to_free = &loc;
+    if ( loc.ops->node_type( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
+      errno = ENOTDIR;
+      goto cleanup_and_bail;
+    }
+
+    /*
+     *  You can only mount one file system onto a single mount point.
+     */
+
+    if ( search_mt_for_mount_point( &loc ) == FOUND ) {
+      errno = EBUSY;
+      goto cleanup_and_bail;
+    }
  
-     /*
-      * This must be a good mount point, so move the location information
-      * into the allocated mount entry
-      */
-
-     temp_mt_entry->mt_point_node.node_access = loc.node_access;
-     temp_mt_entry->mt_point_node.handlers = loc.handlers;
-     temp_mt_entry->mt_point_node.ops = loc.ops;
-     temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
-
-     /* 
-      * This link to the parent is only done when we are dealing with system 
-      * below the base file system 
-      */
-
-     if ( !loc.ops->mount ){
-       errno = ENOTSUP;
-       goto cleanup_and_bail;
-     }
-
-     if ( loc.ops->mount( temp_mt_entry ) ) {
-        goto cleanup_and_bail;
-     }
-  }
-  else {
-
-     /* 
-      * This is a mount of the base file system --> The 
-      * mt_point_node.node_access will be set to null to indicate that this 
-      * is the root of the entire file system.
-      */
-
-      temp_mt_entry->mt_fs_root.node_access = NULL;
-      temp_mt_entry->mt_fs_root.handlers = NULL;
-      temp_mt_entry->mt_fs_root.ops = NULL;
-
-      temp_mt_entry->mt_point_node.node_access = NULL;
-      temp_mt_entry->mt_point_node.handlers = NULL;
-      temp_mt_entry->mt_point_node.ops = NULL;
-      temp_mt_entry->mt_point_node.mt_entry = NULL;
+    /*
+     *  This must be a good mount point, so move the location information
+     *  into the allocated mount entry.  Note:  the information that
+     *  may have been allocated in loc should not be sent to freenode 
+     *  until the system is unmounted.  It may be needed to correctly
+     *  traverse the tree.
+     */
+
+    temp_mt_entry->mt_point_node.node_access = loc.node_access;
+    temp_mt_entry->mt_point_node.handlers = loc.handlers;
+    temp_mt_entry->mt_point_node.ops = loc.ops;
+    temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
+
+    /* 
+     *  This link to the parent is only done when we are dealing with system 
+     *  below the base file system 
+     */
+
+    if ( !loc.ops->mount ){
+      errno = ENOTSUP;
+      goto cleanup_and_bail;
+    }
+
+    if ( loc.ops->mount( temp_mt_entry ) ) {
+      goto cleanup_and_bail;
+    }
+  } else {
+
+    /* 
+     *  This is a mount of the base file system --> The 
+     *  mt_point_node.node_access will be set to null to indicate that this 
+     *  is the root of the entire file system.
+     */
+
+    temp_mt_entry->mt_fs_root.node_access = NULL;
+    temp_mt_entry->mt_fs_root.handlers = NULL;
+    temp_mt_entry->mt_fs_root.ops = NULL;
+
+    temp_mt_entry->mt_point_node.node_access = NULL;
+    temp_mt_entry->mt_point_node.handlers = NULL;
+    temp_mt_entry->mt_point_node.ops = NULL;
+    temp_mt_entry->mt_point_node.mt_entry = NULL;
   }
 
   if ( !fs_ops->fsmount_me ){
-      errno = ENOTSUP;
-      goto cleanup_and_bail;
+    errno = ENOTSUP;
+    goto cleanup_and_bail;
   }
 
   if ( fs_ops->fsmount_me( temp_mt_entry ) )
-      goto cleanup_and_bail;
-
-  /*
-   * Add the mount table entry to the mount table chain 
+    goto cleanup_and_bail;
+
+  /*
+   *  Add the mount table entry to the mount table chain 
    */
 
@@ -225,14 +227,13 @@
   *mt_entry = temp_mt_entry;
 
-  rtems_filesystem_freenode( &loc );
+  return 0;
+
+cleanup_and_bail:
+
+  free( temp_mt_entry );
   
-  return 0;
-
-cleanup_and_bail:
-
-  free( temp_mt_entry );
-
-  rtems_filesystem_freenode( &loc );
-  
+  if ( loc_to_free )
+    rtems_filesystem_freenode( loc_to_free );
+
   return -1;
 }
Index: cpukit/libcsupport/src/unmount.c
===================================================================
--- cpukit/libcsupport/src/unmount.c	(revision 72d3f610f4545387652a27621cbb2daf615c1095)
+++ cpukit/libcsupport/src/unmount.c	(revision 04df848c650ae9701bba83307d638b1e38db3b1b)
@@ -138,4 +138,5 @@
    */
 
+  rtems_filesystem_freenode( &temp_loc.mt_entry->mt_point_node );
   free( temp_loc.mt_entry );
   rtems_filesystem_freenode( &temp_loc );
