summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2023-06-22 14:59:12 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2023-08-04 16:17:47 +0300
commit596a5123cc782d458b057eb3837e66535cd0befa (patch)
tree12ab85713aaf55b83e7f6755f62cbd5db5330db1 /drivers
parent583893a66d731f5da010a3fa38a0460e05f0149b (diff)
downloadlinux-stable-596a5123cc782d458b057eb3837e66535cd0befa.tar.gz
linux-stable-596a5123cc782d458b057eb3837e66535cd0befa.tar.bz2
linux-stable-596a5123cc782d458b057eb3837e66535cd0befa.zip
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: 6ce3563520be ("thunderbolt: Add support for DisplayPort bandwidth allocation mode") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/thunderbolt/tb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index 62b26b7998fd..3fb4553a6442 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -1964,6 +1964,8 @@ unlock:
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)