fix: wrong free

This commit is contained in:
ceriel 1987-07-16 16:08:13 +00:00
parent 0619d27b8d
commit 4804ab14b8
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ FILE *fp;
close(fileno(fp));
if ( io_testflag(fp,IO_MYBUF) && fp->_buf )
free( fp->_buf );
free(fp);
if (fp != &_stdin && fp != &_stdout && fp != &_stderr) free(fp);
return(NULL);
}

View file

@ -48,7 +48,7 @@ FILE *fp;
break;
}
}
free(fp);
if (fp != &_stdin && fp != &_stdout && fp != &_stderr) free(fp);
return NULL;
}