* tr: fix leakage of device in net/802/tr.c
@ 2009-04-09 7:27 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2009-04-09 7:27 UTC (permalink / raw)
To: David Miller, netdev
Add dev_put() after dev_get_by_index() to avoid leakage
of device.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/802/tr.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/802/tr.c b/net/802/tr.c
index e7eb130..e874447 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -561,6 +561,9 @@ static int rif_seq_show(struct seq_file *seq, void *v)
}
seq_putc(seq, '\n');
}
+
+ if (dev)
+ dev_put(dev);
}
return 0;
}
--
1.5.3.8
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-09 7:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 7:27 tr: fix leakage of device in net/802/tr.c Wei Yongjun
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).