diff options
author | Thomas Jarosch <thomas.jarosch@intra2net.com> | 2014-12-10 22:56:35 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-12-11 00:35:37 +0100 |
commit | 0ec644c3583b50e68ff23597d8d2c257bfcf7c71 (patch) | |
tree | 9fb3484c64f9c769c79a6a5bc5cd63b21ffc43e6 /src | |
parent | e78ce22430f4b1e10daef21d480298d0fdb377d9 (diff) | |
download | conntrack-tools-0ec644c3583b50e68ff23597d8d2c257bfcf7c71.tar.gz conntrack-tools-0ec644c3583b50e68ff23597d8d2c257bfcf7c71.zip |
channel: Fix file descriptor leak in channel_open() on error
Detected by cppcheck
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/channel.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c index 8b7c319..acbfa7d 100644 --- a/src/channel.c +++ b/src/channel.c @@ -109,6 +109,7 @@ channel_open(struct channel_conf *cfg) if (ioctl(fd, SIOCGIFMTU, &ifr) == -1) { free(c); + close(fd); return NULL; } close(fd); |