Skip to content

Commit 596a512

Browse files
committed
thunderbolt: Fix memory leak in tb_handle_dp_bandwidth_request()
The memory allocated in tb_queue_dp_bandwidth_request() needs to be released once the request is handled to avoid leaking it. Fixes: 6ce3563 ("thunderbolt: Add support for DisplayPort bandwidth allocation mode") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
1 parent 583893a commit 596a512

File tree

1 file changed

+2
-0
lines changed
  • drivers/thunderbolt

1 file changed

+2
-0
lines changed

drivers/thunderbolt/tb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,6 +1964,8 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
19641964

19651965
pm_runtime_mark_last_busy(&tb->dev);
19661966
pm_runtime_put_autosuspend(&tb->dev);
1967+
1968+
kfree(ev);
19671969
}
19681970

19691971
static void tb_queue_dp_bandwidth_request(struct tb *tb, u64 route, u8 port)

0 commit comments

Comments
 (0)