summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
authorrusty <rusty>2001-02-09 02:16:02 +0000
committerrusty <rusty>2001-02-09 02:16:02 +0000
commitfeb9ff7836f4063fc912b3e2f4236afca155575b (patch)
tree8a830b54247476686bceed6f7d0d8c2c57644fd8 /iptables.c
parent3f39f13f9de2758143306b6295963b5c6c81a9ad (diff)
Added Laurence J. Lane's CR at end of /proc/sys/modprobe removal patch.
Fixed FD leak in success case.
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/iptables.c b/iptables.c
index c570d3a..86f1aa1 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1537,6 +1537,9 @@ static char *get_modprobe(void)
case -1: goto fail;
case 1024: goto fail; /* Partial read. Wierd */
}
+ if (ret[strlen(ret)-1]=='\n')
+ ret[strlen(ret)-1]=0;
+ close(procfile);
return ret;
}
fail: