Re: Is this a bug in libc6?
On 10 Apr 1998, Eloy A. Paris wrote:
> Hi,
>
> try running the following simple program:
>
> #include <stdio.h>
>
> void main(void)
> {
> FILE *fp;
>
> fp = fopen("file.txt", "r");
> fclose(fp);
> fclose(fp);
> }
This is not valid. fclose's behavoir on a null fp is apparently not
defined, but exiting with error would be prefered to faulting. A double
fclose is just as bad as a double free() and is not a library error should
it fault or corrupt memory.
Jason
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: