summary refs log tree commit diff stats
path: root/src/common/text.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-02-12 10:28:53 -0500
committerTingPing <tingping@tingping.se>2014-02-12 10:31:11 -0500
commitb17c0276de4da4cd75114d7e1c67738f894ad59e (patch)
treed6a9a824d704b8bdee5c2a1800b0fbffa1bd4b46 /src/common/text.c
parentba399eb7f9f788f2a261f1e912be79f742fd2070 (diff)
Fix some leaks
Diffstat (limited to 'src/common/text.c')
-rw-r--r--src/common/text.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/text.c b/src/common/text.c
index 1afb0c18..a01fc2c8 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -1659,7 +1659,10 @@ pevent_load (char *filename)
 	if (fd == -1)
 		return 1;
 	if (fstat (fd, &st) != 0)
+	{
+		close (fd);
 		return 1;
+	}
 	ibuf = malloc (st.st_size);
 	read (fd, ibuf, st.st_size);
 	close (fd);