Fix file descriptor leak in channel_open() on error
PATCH 1/1 Fix file descriptor leak in channel_open() on error
Detected by cppcheck
Signed-off-by Thomas Jarosch <[email protected]>
--- src/channel.c | 1 + 1 file changed, 1 insertion(+)
src/channel.c +1 -0
@@ -109,6 +109,7 @@ channel_open(struct channel_conf *cfg)if (ioctl (fd,SIOCGIFMTU , &ifr) ==-1 ) {free (c); +close (fd);return NULL ; }close (fd);
Signature · 1 line
1.9.3
Quoted 1 line · Thomas Jarosch
Detected by cppcheck
Applied, thanks Thomas.