Skip to content

Commit

Permalink
tr: fix leakage of device in net/802/tr.c
Browse files Browse the repository at this point in the history
Add dev_put() after dev_get_by_index() to avoid leakage
of device.

Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wei Yongjun authored and davem330 committed Apr 11, 2009
1 parent d6c519e commit 3384901
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/802/tr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3384901

Please sign in to comment.