forked from mirrors/gecko-dev
Bug 1942551 - WebRTC backport: PipeWire camera: Fix cleanup order a=pascalc
The hook is associated with the proxy object. We should remove the hook first before destroying the proxy object to avoid use-after-free. This is a simple backport of an WebRTC upstream change. Upstream commit: caa8ef3ab511d54dfa486eb7599ef0a74f7471ee Original Revision: https://phabricator.services.mozilla.com/D239886 Differential Revision: https://phabricator.services.mozilla.com/D240592
This commit is contained in:
parent
77083f780d
commit
198851a7d3
2 changed files with 3 additions and 1 deletions
|
|
@ -68,8 +68,8 @@ PipeWireNode::PipeWireNode(PipeWireSession* session,
|
||||||
}
|
}
|
||||||
|
|
||||||
PipeWireNode::~PipeWireNode() {
|
PipeWireNode::~PipeWireNode() {
|
||||||
pw_proxy_destroy(proxy_);
|
|
||||||
spa_hook_remove(&node_listener_);
|
spa_hook_remove(&node_listener_);
|
||||||
|
pw_proxy_destroy(proxy_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|
|
||||||
2
third_party/libwebrtc/moz-patch-stack/caa8ef3ab5.no-op-cherry-pick-msg
vendored
Normal file
2
third_party/libwebrtc/moz-patch-stack/caa8ef3ab5.no-op-cherry-pick-msg
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
We cherry-picked this in bug 1942551.
|
||||||
|
|
||||||
Loading…
Reference in a new issue