summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2007-10-19 15:22:56 +0000
committerPeter Jones <pjones@redhat.com>2007-10-19 15:22:56 +0000
commit0b7814a745343efbbb64f53775d1594fd5e805c2 (patch)
treeec687df40f4fbb820c10505c4e4569de38c1de42
parent16385c3293ab56651503ccf3e4757214c81ea5a9 (diff)
downloadanaconda-0b7814a745343efbbb64f53775d1594fd5e805c2.tar.gz
anaconda-0b7814a745343efbbb64f53775d1594fd5e805c2.tar.xz
anaconda-0b7814a745343efbbb64f53775d1594fd5e805c2.zip
- close /proc/net/dev when we're done with it.
-rw-r--r--ChangeLog3
-rw-r--r--loader2/modules.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b8a6cf75..18bd7f5c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
* product.py: close /.buildstamp when we're done with it.
+ * loader2/modules.c (ethCount): close /proc/net/dev when we're done
+ with it.
+
2007-10-19 Chris Lumens <clumens@redhat.com>
* isys/nl.c (netlink_interfaces_ip2str, netlink_interfaces_mac2str):
diff --git a/loader2/modules.c b/loader2/modules.c
index 3a1c69a26..ebe6cba95 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -58,6 +58,7 @@ static int ethCount(const char * type) {
fd = open("/proc/net/dev", O_RDONLY);
i = read(fd, buf, sizeof(buf) - 1);
+ close(fd);
buf[i] = '\0';
/* skip first two header lines */