changeset 1424:c7e68755c7ec

Add overlooked fclose in error case
author Chris Cannam
date Mon, 09 Oct 2017 11:08:59 +0100
parents 04ce84f21af3
children bd73a689c8af
files system/System.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/system/System.cpp	Thu Aug 31 18:46:03 2017 +0100
+++ b/system/System.cpp	Mon Oct 09 11:08:59 2017 +0100
@@ -212,6 +212,7 @@
     char buf[256];
     while (!feof(meminfo)) {
         if (!fgets(buf, 256, meminfo)) {
+            fclose(meminfo);
             return;
         }
         bool isMemFree = (strncmp(buf, "MemFree:", 8) == 0);