Mirko Bonadei 1f1abd1dcc Fix observer ref counting.
By calling release() the ref counter is not decremented and when the
observer is later wrapped in a scoped_refprt its counter will be 2
instead of 1, leading to a memory leak.

Bug: b/231912631
Change-Id: I466e5c29ba4f4aee43e8cf23f2e04fa4b6351b4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261954
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36862}
2022-05-12 09:58:21 +00:00
..
2022-05-12 09:58:21 +00:00