Fix some leaks

This commit is contained in:
TingPing
2014-02-12 10:28:53 -05:00
parent ba399eb7f9
commit b17c0276de
6 changed files with 16 additions and 0 deletions

View File

@@ -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);