fix: wrong free
This commit is contained in:
		
							parent
							
								
									0619d27b8d
								
							
						
					
					
						commit
						4804ab14b8
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -17,7 +17,7 @@ FILE *fp; | ||||||
| 	close(fileno(fp)); | 	close(fileno(fp)); | ||||||
| 	if ( io_testflag(fp,IO_MYBUF) && fp->_buf ) | 	if ( io_testflag(fp,IO_MYBUF) && fp->_buf ) | ||||||
| 		free( fp->_buf ); | 		free( fp->_buf ); | ||||||
| 	free(fp); | 	if (fp != &_stdin && fp != &_stdout && fp != &_stderr) free(fp); | ||||||
| 	return(NULL); | 	return(NULL); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -48,7 +48,7 @@ FILE *fp; | ||||||
| 				break; | 				break; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		free(fp); | 		if (fp != &_stdin && fp != &_stdout && fp != &_stderr) free(fp); | ||||||
| 		return NULL; | 		return NULL; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue