Changeset 1d66629 in rtems


Ignore:
Timestamp:
10/24/02 18:54:07 (21 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
38ad1630
Parents:
bf61751c
Message:

2002-10-24 <strauman@…>

  • src/eval.c: Per PR293, added freenode calls for evaluate

link failures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/eval.c

    rbf61751c r1d66629  
    6161  if ( (result == 0) && follow_link ) {
    6262
    63     if ( !pathloc->ops->node_type_h )
     63    if ( !pathloc->ops->node_type_h ){
     64      rtems_filesystem_freenode( pathloc );
    6465      rtems_set_errno_and_return_minus_one( ENOTSUP );
     66    }
    6567
    6668    type = (*pathloc->ops->node_type_h)( pathloc );
     
    6971         ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
    7072
    71         if ( !pathloc->ops->eval_link_h )
     73        if ( !pathloc->ops->eval_link_h ){
     74          rtems_filesystem_freenode( pathloc );
    7275          rtems_set_errno_and_return_minus_one( ENOTSUP );
     76        }
    7377
    74          result =  (*pathloc->ops->eval_link_h)( pathloc, flags );
     78        /* what to do with the valid node pathloc points to
     79         * if eval_link_h fails?
     80         * Let the FS implementation deal with this case.  It
     81         * should probably free pathloc in either case:
     82         *  - if the link evaluation fails, it must free the
     83         *    original (valid) pathloc because we are going
     84         *    to return -1 and hence the FS generics won't
     85         *    cleanup pathloc.
     86         *  - if the link evaluation is successful, the updated
     87         *    pathloc will be passed up (and eventually released).
     88         *    Hence, the (valid) originial node that we submit to
     89         *    eval_link_h() should be released by the handler.
     90         */
     91
     92        result =  (*pathloc->ops->eval_link_h)( pathloc, flags );
    7593 
    7694    }
Note: See TracChangeset for help on using the changeset viewer.