* [iproute2 PATCH 11/11] Fix file descriptor leak on error in read_igmp()
@ 2011-10-03 15:24 Thomas Jarosch
2011-10-07 18:28 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Jarosch @ 2011-10-03 15:24 UTC (permalink / raw)
To: netdev
Detected by cppcheck.
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
---
ip/ipmaddr.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ip/ipmaddr.c b/ip/ipmaddr.c
index 5a52c85..3ae9478 100644
--- a/ip/ipmaddr.c
+++ b/ip/ipmaddr.c
@@ -128,8 +128,10 @@ void read_igmp(struct ma_info **result_p)
if (!fp)
return;
memset(&m, 0, sizeof(m));
- if (!fgets(buf, sizeof(buf), fp))
+ if (!fgets(buf, sizeof(buf), fp)) {
+ fclose(fp);
return;
+ }
m.addr.family = AF_INET;
m.addr.bitlen = 32;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [iproute2 PATCH 11/11] Fix file descriptor leak on error in read_igmp()
2011-10-03 15:24 [iproute2 PATCH 11/11] Fix file descriptor leak on error in read_igmp() Thomas Jarosch
@ 2011-10-07 18:28 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2011-10-07 18:28 UTC (permalink / raw)
To: Thomas Jarosch; +Cc: netdev
All these are applied and pushed to (temporary) github repo.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-07 18:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 15:24 [iproute2 PATCH 11/11] Fix file descriptor leak on error in read_igmp() Thomas Jarosch
2011-10-07 18:28 ` Stephen Hemminger
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).