projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ce71cb
)
module: Fix crash in pa_module_unload_all()
author
Tanu Kaskinen
<tanu.kaskinen@linux.intel.com>
Thu, 11 Jul 2013 10:35:24 +0000
(13:35 +0300)
committer
Tanu Kaskinen
<tanu.kaskinen@linux.intel.com>
Thu, 11 Jul 2013 10:35:24 +0000
(13:35 +0300)
Previously, if there were no modules loaded when the daemon exited,
pa_module_unload_all() would crash due to giving zero count to
pa_xnew().
Thanks to Pierre Ossman for the patch.
src/pulsecore/module.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/module.c
b/src/pulsecore/module.c
index
3960969
..
16582b3
100644
(file)
--- a/
src/pulsecore/module.c
+++ b/
src/pulsecore/module.c
@@
-221,6
+221,9
@@
void pa_module_unload_all(pa_core *c) {
pa_assert(c);
pa_assert(c->modules);
+ if (pa_idxset_isempty(c->modules))
+ return;
+
/* Unload modules in reverse order by default */
indices = pa_xnew(uint32_t, pa_idxset_size(c->modules));
i = 0;