summaryrefslogtreecommitdiff
path: root/userland/libc/stdio/fclose.c
blob: 02d93ae46b9ded1b287d4422cb75fec9d774d7d5 (plain)
1
2
3
4
5
6
7
8
9
10
#include <stdio.h>
#include <stdlib.h>

// https://pubs.opengroup.org/onlinepubs/9699919799/functions/fclose.html
// FIXME: Do some actual error checking.
int fclose(FILE *stream) {
    free(stream->cookie);
    free(stream);
    return 0;
}