diff options
author | laforge <laforge> | 2002-01-07 13:46:50 +0000 |
---|---|---|
committer | laforge <laforge> | 2002-01-07 13:46:50 +0000 |
commit | 9fe37ecb8d9c86c7d05a3449aa2d82b7c50c7be8 (patch) | |
tree | 6c022e30215585d5bf3a25615eb0764a766b442f /libiptc/libiptc.c | |
parent | b5f4f68cba20f469b7cdda59bc55dd4efb552b03 (diff) |
libiptc socket leaking fix
Diffstat (limited to 'libiptc/libiptc.c')
-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 73cb217..3574ac8 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; |