diff options
| author | Cong Wang <[email protected]> | 2020-07-09 03:13:59 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2020-07-09 19:31:28 +0000 |
| commit | 306381aec7c2b5a658eebca008c8a1b666536cba (patch) | |
| tree | d28155bb389847c2f3821f7a759895c7b65be460 /drivers/usb/cdns3/cdns3-ti.c | |
| parent | qed: Populate nvm-file attributes while reading nvm config partition. (diff) | |
| download | kernel-306381aec7c2b5a658eebca008c8a1b666536cba.tar.gz kernel-306381aec7c2b5a658eebca008c8a1b666536cba.zip | |
net_sched: fix a memory leak in atm_tc_init()
When tcf_block_get() fails inside atm_tc_init(),
atm_tc_put() is called to release the qdisc p->link.q.
But the flow->ref prevents it to do so, as the flow->ref
is still zero.
Fix this by moving the p->link.ref initialization before
tcf_block_get().
Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure")
Reported-and-tested-by: [email protected]
Cc: Jamal Hadi Salim <[email protected]>
Cc: Jiri Pirko <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-ti.c')
0 files changed, 0 insertions, 0 deletions
