[pulseaudio-discuss] [PATCH v2 06/22] bluetooth: Fix using garbage memory
Mikel Astiz
mikel.astiz.oss at gmail.com
Fri Aug 31 03:50:58 PDT 2012
From: Mikel Astiz <mikel.astiz at bmw-carit.de>
module-bluetooth-policy should set the allocated memory to zero, in
order to handle failure cases properly.
---
src/modules/bluetooth/module-bluetooth-policy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c
index 03beeb2..cc12014 100644
--- a/src/modules/bluetooth/module-bluetooth-policy.c
+++ b/src/modules/bluetooth/module-bluetooth-policy.c
@@ -143,7 +143,7 @@ int pa__init(pa_module *m) {
return -1;
}
- m->userdata = u = pa_xnew(struct userdata, 1);
+ m->userdata = u = pa_xnew0(struct userdata, 1);
u->enable_a2dp_source = TRUE;
if (pa_modargs_get_value_boolean(ma, "a2dp_source", &u->enable_a2dp_source) < 0) {
--
1.7.7.6
More information about the pulseaudio-discuss
mailing list