mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user