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-Tag: v2.6.30-rc4~3^2~133 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3384901f1b1af676ccb9d75aa23a568c294c527b;p=platform%2Fupstream%2Fkernel-adaptation-pc.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 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; }