summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-12-07 08:04:04 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-12-07 08:04:04 +0000
commitbcc1d569bcfb0cd026930eb6a8ee607a8002f523 (patch)
tree42a639d7485bb653015c9098ed4025e790c0e99b /audio
parentc7514bc9b27c43fadfcb02180e7d8875890c7820 (diff)
Fix unitialized memory access issue
Diffstat (limited to 'audio')
-rw-r--r--audio/a2dp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c
index 95040873..7b17f941 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -1016,7 +1016,7 @@ unsigned int a2dp_source_config(struct avdtp *session, a2dp_config_cb_t cb,
debug("a2dp_source_config: selected SEP %p", sep);
- cb_data = g_new(struct a2dp_setup_cb, 1);
+ cb_data = g_new0(struct a2dp_setup_cb, 1);
cb_data->config_cb = cb;
cb_data->user_data = user_data;
cb_data->id = ++cb_id;
@@ -1137,7 +1137,7 @@ unsigned int a2dp_source_suspend(struct avdtp *session, struct a2dp_sep *sep,
struct a2dp_setup_cb *cb_data;
struct a2dp_setup *setup;
- cb_data = g_new(struct a2dp_setup_cb, 1);
+ cb_data = g_new0(struct a2dp_setup_cb, 1);
cb_data->suspend_cb = cb;
cb_data->user_data = user_data;
cb_data->id = ++cb_id;