dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Wei Yongjun 2009-04-08 21:27:28 +00:00 committed by David S. Miller
parent d6c519e129
commit 3384901f1b
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}