* [conntrack-tools PATCH] Fix file descriptor leak in channel_open() on error
@ 2014-12-10 21:56 Thomas Jarosch
2014-12-10 23:36 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Jarosch @ 2014-12-10 21:56 UTC (permalink / raw)
To: netfilter-devel
Detected by cppcheck
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
---
src/channel.c | 1 +
1 file changed, 1 insertion(+)
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);
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [conntrack-tools PATCH] Fix file descriptor leak in channel_open() on error
2014-12-10 21:56 [conntrack-tools PATCH] Fix file descriptor leak in channel_open() on error Thomas Jarosch
@ 2014-12-10 23:36 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-12-10 23:36 UTC (permalink / raw)
To: Thomas Jarosch; +Cc: netfilter-devel
On Wed, Dec 10, 2014 at 10:56:35PM +0100, Thomas Jarosch wrote:
> Detected by cppcheck
Applied, thanks Thomas.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-10 23:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 21:56 [conntrack-tools PATCH] Fix file descriptor leak in channel_open() on error Thomas Jarosch
2014-12-10 23:36 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).