Ignore:
Timestamp:
Apr 18, 2016, 4:23:27 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ca18cb59
Parents:
928d455
git-author:
Sebastian Huber <sebastian.huber@…> (04/18/16 04:23:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/21/16 05:29:38)
Message:

score: Fix _CORE_semaphore_Flush()

Use proper CORE_semaphore_Status for _CORE_semaphore_Flush() and
_CORE_semaphore_Destroy() operations.

Close #2696.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/semaphorecreatesupp.c

    r928d455 r90f1265  
    5555    rtems_set_errno_and_return_minus_one( ENOSYS );
    5656
    57   the_semaphore = _POSIX_Semaphore_Allocate_unprotected();
    58   if ( !the_semaphore ) {
    59     rtems_set_errno_and_return_minus_one( ENOSPC );
    60   }
    61 
    6257  /*
    6358   * Make a copy of the user's string for name just in case it was
     
    6762    name = _Workspace_String_duplicate( name_arg, name_len );
    6863    if ( !name ) {
    69       _POSIX_Semaphore_Free( the_semaphore );
    7064      rtems_set_errno_and_return_minus_one( ENOMEM );
    7165    }
    7266  } else {
    7367    name = NULL;
     68  }
     69
     70  the_semaphore = _POSIX_Semaphore_Allocate_unprotected();
     71  if ( !the_semaphore ) {
     72    _Workspace_Free( name );
     73    rtems_set_errno_and_return_minus_one( ENOSPC );
    7474  }
    7575
Note: See TracChangeset for help on using the changeset viewer.