2003-08-05 Till Strauman <strauman@slac.stanford.edu>

PR 442/filesystem
	* src/open.c: file never closed if ftruncate() fails in open()
This commit is contained in:
Jennifer Averett
2003-08-05 15:54:28 +00:00
parent e53906487f
commit f114f9d03c
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2003-08-05 Till Strauman <strauman@slac.stanford.edu>
PR 442/filesystem
* src/open.c: file never closed if ftruncate() fails in open()
2003-07-08 Joel Sherrill <joel@OARcorp.com>
PR 419/rtems

View File

@@ -173,6 +173,12 @@ int open(
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
}
}
/*