r157 - trunk
Petter Reinholdtsen
pere at moszumanska.debian.org
Sat Jan 11 22:26:25 UTC 2014
Author: pere
Date: 2014-01-11 22:26:25 +0000 (Sat, 11 Jan 2014)
New Revision: 157
Modified:
trunk/killrpath.c
Log:
Fix more file descriptor leak (Coverity CID 1153652).
Modified: trunk/killrpath.c
===================================================================
--- trunk/killrpath.c 2014-01-11 22:10:21 UTC (rev 156)
+++ trunk/killrpath.c 2014-01-11 22:26:25 UTC (rev 157)
@@ -49,6 +49,7 @@
if (0 != elf_find_dynamic_section(fd, &ehdr, &phdr))
{
perror("found no dynamic section");
+ elf_close(fd);
return 1;
}
@@ -56,6 +57,7 @@
if (dyns == NULL)
{
perror ("allocating memory for dynamic section");
+ elf_close(fd);
return 1;
}
memset(dyns, 0, PHDR(p_memsz));
@@ -64,6 +66,7 @@
{
perror ("reading dynamic section");
free(dyns);
+ elf_close(fd);
return 1;
}
More information about the Chrpath-commits
mailing list