Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
74273d41
Commit
74273d41
authored
Mar 26, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pulse_mixer: free libpulse objects on failure
When the mixer initialization fails, we have to free the libpulse objects we have already created, to prevent resource leaks.
parent
3d2c8b00
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
pulse_mixer.c
src/mixer/pulse_mixer.c
+6
-0
No files found.
src/mixer/pulse_mixer.c
View file @
74273d41
...
@@ -236,11 +236,17 @@ pulse_mixer_open(G_GNUC_UNUSED struct mixer *data)
...
@@ -236,11 +236,17 @@ pulse_mixer_open(G_GNUC_UNUSED struct mixer *data)
if
(
!
(
pm
->
context
=
pa_context_new
(
pa_threaded_mainloop_get_api
(
pm
->
mainloop
),
if
(
!
(
pm
->
context
=
pa_context_new
(
pa_threaded_mainloop_get_api
(
pm
->
mainloop
),
"Mixer mpd"
)))
{
"Mixer mpd"
)))
{
pa_threaded_mainloop_stop
(
pm
->
mainloop
);
pa_threaded_mainloop_free
(
pm
->
mainloop
);
g_debug
(
"failed context"
);
g_debug
(
"failed context"
);
return
false
;
return
false
;
}
}
if
(
!
pulse_mixer_setup
(
pm
))
{
if
(
!
pulse_mixer_setup
(
pm
))
{
pa_threaded_mainloop_stop
(
pm
->
mainloop
);
pa_context_disconnect
(
pm
->
context
);
pa_context_unref
(
pm
->
context
);
pa_threaded_mainloop_free
(
pm
->
mainloop
);
return
false
;
return
false
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment