Avoid a fault from locking a closed standard file.
* libc/stdio/fflush.c (_fflush_r): Give up early if stream has been previously closed.
This commit is contained in:
		
							parent
							
								
									dc176ff60c
								
							
						
					
					
						commit
						d6438f13d1
					
				|  | @ -1,3 +1,9 @@ | |||
| 2009-07-22  Eric Blake  <ebb9@byu.net> | ||||
| 
 | ||||
| 	Avoid a fault from locking a closed standard file. | ||||
| 	* libc/stdio/fflush.c (_fflush_r): Give up early if stream has | ||||
| 	been previously closed. | ||||
| 
 | ||||
| 2009-07-09  Craig Howland <howland@LGSInnovations.com> | ||||
| 
 | ||||
| 	* libm/math/ef_scalb.c:  Replace isnanf() (pre-C99 function call) with | ||||
|  |  | |||
|  | @ -93,6 +93,9 @@ _DEFUN(_fflush_r, (ptr, fp), | |||
| 
 | ||||
|   CHECK_INIT (ptr, fp); | ||||
| 
 | ||||
|   if (!fp->_flags) | ||||
|     return 0; | ||||
| 
 | ||||
|   _flockfile (fp); | ||||
| 
 | ||||
|   t = fp->_flags; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue