bluetooth: Fix using garbage memory

module-bluetooth-policy should set the allocated memory to zero, in
order to handle failure cases properly.
This commit is contained in:
Mikel Astiz 2012-08-31 12:50:58 +02:00 committed by Arun Raghavan
parent 9a5330e601
commit 76248fd8f2

View file

@ -143,7 +143,7 @@ int pa__init(pa_module *m) {
return -1; return -1;
} }
m->userdata = u = pa_xnew(struct userdata, 1); m->userdata = u = pa_xnew0(struct userdata, 1);
u->enable_a2dp_source = TRUE; u->enable_a2dp_source = TRUE;
if (pa_modargs_get_value_boolean(ma, "a2dp_source", &u->enable_a2dp_source) < 0) { if (pa_modargs_get_value_boolean(ma, "a2dp_source", &u->enable_a2dp_source) < 0) {