Bug 1942551 - WebRTC backport: PipeWire camera: Fix cleanup order r=pehrsons,webrtc-reviewers
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 Differential Revision: https://phabricator.services.mozilla.com/D239886
This commit is contained in:
@@ -58,8 +58,8 @@ VideoType PipeWireRawFormatToVideoType(uint32_t id) {
|
|||||||
|
|
||||||
void PipeWireNode::PipeWireNodeDeleter::operator()(
|
void PipeWireNode::PipeWireNodeDeleter::operator()(
|
||||||
PipeWireNode* node) const noexcept {
|
PipeWireNode* node) const noexcept {
|
||||||
pw_proxy_destroy(node->proxy_);
|
|
||||||
spa_hook_remove(&node->node_listener_);
|
spa_hook_remove(&node->node_listener_);
|
||||||
|
pw_proxy_destroy(node->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.
|
||||||
|
|
||||||
Reference in New Issue
Block a user