Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP2
pipewire.30043
0017-alsa-dont-leak-properties-on-error.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0017-alsa-dont-leak-properties-on-error.patch of Package pipewire.30043
From e11d35107fc9e3a392b74855238be40f7bf69ff7 Mon Sep 17 00:00:00 2001 From: Wim Taymans <wtaymans@redhat.com> Date: Thu, 2 Jul 2020 15:53:16 +0200 Subject: [PATCH] alsa: don't leak properties on error --- pipewire-alsa/alsa-plugins/pcm_pipewire.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pipewire-alsa/alsa-plugins/pcm_pipewire.c b/pipewire-alsa/alsa-plugins/pcm_pipewire.c index d2fdcf44..560460cb 100644 --- a/pipewire-alsa/alsa-plugins/pcm_pipewire.c +++ b/pipewire-alsa/alsa-plugins/pcm_pipewire.c @@ -890,7 +890,7 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name, snd_pcm_pipewire_t *pw; int err; const char *str; - struct pw_properties *props; + struct pw_properties *props = NULL; struct pw_loop *loop; assert(pcmp); @@ -947,6 +947,7 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name, pw_thread_loop_lock(pw->main_loop); pw->core = pw_context_connect(pw->context, props, 0); + props = NULL; if (pw->core == NULL) { err = -errno; pw_thread_loop_unlock(pw->main_loop); @@ -983,7 +984,9 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp, const char *name, return 0; - error: +error: + if (props) + pw_properties_free(props); snd_pcm_pipewire_free(pw); return err; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor