Change-Id: If5ac7da29996f4d4b5d6c8f2a1e24dba58986a77
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
gboolean init_by_hf)
{
uint32_t codec;
- struct ag_codec *data = g_new0(struct ag_codec, 1);
+ struct ag_codec *data = NULL;;
#ifdef TIZEN_FEATURE_BT_KIRAN_DEVICE
codec = BT_CVSD_CODEC_ID;
hs->codec_info.requested_by_hf = init_by_hf;
hs->codec_info.final_codec = codec;
+ data = g_new0(struct ag_codec, 1);
+ if (data == NULL)
+ return BT_HFP_AGENT_ERROR_NO_MEMORY;
+
data->bt_ag_info = hs;
data->codec_status = g_strdup("timeout");