Changeset 1d4e666 in rtems


Ignore:
Timestamp:
Aug 5, 2003, 3:50:11 PM (16 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
45b185e
Parents:
2e4d84a
Message:

2003-08-05 Till Strauman <strauman@…>

PR 442/filesystem

  • src/open.c: file never closed if ftruncate() fails in open()
Location:
cpukit/libcsupport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/ChangeLog

    r2e4d84a r1d4e666  
     12003-08-05      Till Strauman <strauman@slac.stanford.edu>
     2
     3        PR 442/filesystem
     4        * src/open.c: file never closed if ftruncate() fails in open()
     5
    162003-07-08      Joel Sherrill <joel@OARcorp.com>
    27
  • cpukit/libcsupport/src/open.c

    r2e4d84a r1d4e666  
    174174  if ( (flags & O_TRUNC) == O_TRUNC ) {
    175175    rc = ftruncate( iop - rtems_libio_iops, 0 );
     176    if ( rc ) {
     177      close( iop - rtems_libio_iops );
     178      /* those are released by close(): */
     179      iop = 0;
     180      loc_to_free = NULL;
     181    }
    176182  }
    177183   
Note: See TracChangeset for help on using the changeset viewer.