diff system/System.cpp @ 1424:c7e68755c7ec

Add overlooked fclose in error case
author Chris Cannam
date Mon, 09 Oct 2017 11:08:59 +0100
parents 91231350ee22
children bd1a2cacd1e7
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);