From: Wei Yongjun Date: Wed, 8 Apr 2009 21:27:28 +0000 (+0000) Subject: tr: fix leakage of device in net/802/tr.c X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3384901f1b1af676ccb9d75aa23a568c294c527b;p=openwrt%2Fstaging%2Fblogic.git tr: fix leakage of device in net/802/tr.c Add dev_put() after dev_get_by_index() to avoid leakage of device. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- diff --git a/net/802/tr.c b/net/802/tr.c index e7eb13084d71..e874447ad144 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; }