summaryrefslogtreecommitdiffstats
path: root/net/802
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2009-04-08 21:27:28 +0000
committerDavid S. Miller <davem@davemloft.net>2009-04-11 01:43:17 -0700
commit3384901f1b1af676ccb9d75aa23a568c294c527b (patch)
treecf39f8ae5b2be9357e8ad4b639ff5a002676cca6 /net/802
parentd6c519e12984d26d96b91e4482280acbba0e0a22 (diff)
downloadtalos-op-linux-3384901f1b1af676ccb9d75aa23a568c294c527b.tar.gz
talos-op-linux-3384901f1b1af676ccb9d75aa23a568c294c527b.zip
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 <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/802')
-rw-r--r--net/802/tr.c3
1 files changed, 3 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud