Skip to content

Commit

Permalink
thunderbolt: Fix memory leak in tb_handle_dp_bandwidth_request()
Browse files Browse the repository at this point in the history
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: [email protected]
Signed-off-by: Mika Westerberg <[email protected]>
  • Loading branch information
westeri committed Aug 4, 2023
1 parent 583893a commit 596a512
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/thunderbolt/tb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,8 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)

pm_runtime_mark_last_busy(&tb->dev);
pm_runtime_put_autosuspend(&tb->dev);

kfree(ev);
}

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

0 comments on commit 596a512

Please sign in to comment.