Commit 24199c54 authored by Lyude Paul's avatar Lyude Paul Committed by Ben Skeggs
Browse files

drm/nouveau/kms: Fix memory leak in nv50_mstm_del()

Noticed this while working on redoing the reference counting scheme in
the DP MST helpers. Nouveau doesn't attempt to call
drm_dp_mst_topology_mgr_destroy() at all, which leaves it leaking all of
the resources for drm_dp_mst_topology_mgr and it's children mstbs+ports.

Fixes: f479c0ba

 ("drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream")
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Cc: <stable@vger.kernel.org> # v4.10+
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 970a5ee4
...@@ -1264,6 +1264,7 @@ nv50_mstm_del(struct nv50_mstm **pmstm) ...@@ -1264,6 +1264,7 @@ nv50_mstm_del(struct nv50_mstm **pmstm)
{ {
struct nv50_mstm *mstm = *pmstm; struct nv50_mstm *mstm = *pmstm;
if (mstm) { if (mstm) {
drm_dp_mst_topology_mgr_destroy(&mstm->mgr);
kfree(*pmstm); kfree(*pmstm);
*pmstm = NULL; *pmstm = NULL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment