[vlc-commits] audio_output/winstore: fix free of the default device
Steve Lhomme
git at videolan.org
Wed Nov 25 07:37:23 CET 2020
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 24 08:56:33 2020 +0100| [977ce84d3e9ec6fcd76090bd4fdbf2c2ad19f00b] | committer: Steve Lhomme
audio_output/winstore: fix free of the default device
It must be free'd with CoTaskMemFree and only once.
(cherry picked from commit 4bc2b28f0a47273fb3b4e59304542847c3f6c66a)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=977ce84d3e9ec6fcd76090bd4fdbf2c2ad19f00b
---
modules/audio_output/winstore.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/audio_output/winstore.c b/modules/audio_output/winstore.c
index b93e6a7b92..211ed5001f 100644
--- a/modules/audio_output/winstore.c
+++ b/modules/audio_output/winstore.c
@@ -572,7 +572,8 @@ static void Close(vlc_object_t *obj)
assert(sys->refs == 0);
free(sys->acquired_device);
- free(sys->requested_device);
+ if (sys->requested_device != sys->default_device)
+ free(sys->requested_device);
CoTaskMemFree(sys->default_device);
DeleteCriticalSection(&sys->lock);
More information about the vlc-commits
mailing list