tools/xenalyze: Close symbol_file after reading it
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 25 Feb 2016 14:48:56 +0000 (14:48 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 29 Feb 2016 16:10:44 +0000 (11:10 -0500)
...to avoid leaking the FD and associated memory.

CID 1306872

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xentrace/xenalyze.c

index 1651302099c575492a51a0474beefc632444ea79..3c90a0f5d77bfa8683a96e6670e2ff23a261b982 100644 (file)
@@ -363,6 +363,8 @@ void parse_symbol_file(char *fn) {
             p=&((*p)->next);
         }
     }
+
+    fclose(symbol_file);
 }
 
 /* WARNING not thread safe */