diff --git a/src/util/zbin.c b/src/util/zbin.c index f47fa36b..b24f401e 100644 --- a/src/util/zbin.c +++ b/src/util/zbin.c @@ -90,7 +90,8 @@ static int read_file ( const char *filename, void **buf, size_t *len ) { return 0; err: - fclose ( file ); + if ( file ) + fclose ( file ); return -1; }