X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffclose.c;h=c4f5d8a1b1bdc02cb928a023960fd00968e7210c;hb=84d648157e22cecc65902ecfdd4e3a1b88d5e53f;hp=d20cb3e90a95a5c5d82b4967ff383fff9e95b7ca;hpb=4955ba67ce17eb49d6ac19668d140ade0b501b06;p=pdclib.old diff --git a/functions/stdio/fclose.c b/functions/stdio/fclose.c index d20cb3e..c4f5d8a 100644 --- a/functions/stdio/fclose.c +++ b/functions/stdio/fclose.c @@ -12,6 +12,7 @@ #ifndef REGTEST #include <_PDCLIB_glue.h> +#include extern struct _PDCLIB_file_t * _PDCLIB_filelist; @@ -33,8 +34,13 @@ int fclose( struct _PDCLIB_file_t * stream ) return EOF; } } + + /* Release mutex*/ + mtx_destroy( &stream->lock ); + /* Close handle */ _PDCLIB_close( stream->handle ); + /* Remove stream from list */ if ( previous != NULL ) {