diff options
author | Harald Welte <laforge@gnumonks.org> | 2002-01-07 13:46:50 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2002-01-07 13:46:50 +0000 |
commit | 366454bc69f781fdafc3a30eb6dd77155ee4efb6 (patch) | |
tree | 6c022e30215585d5bf3a25615eb0764a766b442f /libiptc | |
parent | 426d90102b2fa88e6bdd50248b56fa25465ea9dd (diff) |
libiptc socket leaking fix
Diffstat (limited to 'libiptc')
-rw-r--r-- | libiptc/libiptc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index 73cb217c..3574ac8d 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -1,4 +1,4 @@ -/* Library which manipulates firewall rules. Version $Revision: 1.31 $ */ +/* Library which manipulates firewall rules. Version $Revision: 1.32 $ */ /* Architecture of firewall rules is as follows: * @@ -234,6 +234,9 @@ TC_INIT(const char *tablename) iptc_fn = TC_INIT; + if (sockfd != -1) + close(sockfd); + sockfd = socket(TC_AF, SOCK_RAW, IPPROTO_RAW); if (sockfd < 0) return NULL; |