From 76248fd8f2d48f7eb754cad608663759c9be4005 Mon Sep 17 00:00:00 2001 From: Mikel Astiz Date: Fri, 31 Aug 2012 12:50:58 +0200 Subject: [PATCH] bluetooth: Fix using garbage memory 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c index 03beeb244..cc1201460 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) {