Commit 3384901f authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

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: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d6c519e1
...@@ -561,6 +561,9 @@ static int rif_seq_show(struct seq_file *seq, void *v) ...@@ -561,6 +561,9 @@ static int rif_seq_show(struct seq_file *seq, void *v)
} }
seq_putc(seq, '\n'); seq_putc(seq, '\n');
} }
if (dev)
dev_put(dev);
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment