From 24cbff147be8de6e6b445155385d9268d419be15 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Feb 2015 18:03:57 -0500 Subject: [PATCH] additional error tracking after file reads, when closing the stream --- file_ops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/file_ops.c b/file_ops.c index fb874e748c..2b811ccf69 100644 --- a/file_ops.c +++ b/file_ops.c @@ -133,7 +133,9 @@ static bool read_generic_file(const char *path, void **buf, ssize_t *len) /* Allow for easy reading of strings to be safe. * Will only work with sane character formatting (Unix). */ ((char*)rom_buf)[_len] = '\0'; - fclose(file); + + if (fclose(file) != 0) + RARCH_WARN("Failed to close file stream.\n"); if (len) *len = ret;