projects
/
platform
/
core
/
connectivity
/
bluetooth-agent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f18845
)
Add checking memory allocation
71/224171/1
accepted/tizen/unified/20200210.131847
submit/tizen/20200207.062602
author
Semun Lee
<semun.lee@samsung.com>
Fri, 7 Feb 2020 01:34:26 +0000
(10:34 +0900)
committer
Semun Lee
<semun.lee@samsung.com>
Fri, 7 Feb 2020 01:34:26 +0000
(10:34 +0900)
Issue was reported by a static analyzer.
Change-Id: Ib09b4826098bceb79c8d9036767e9ae685ea31a0
Signed-off-by: Semun Lee <semun.lee@samsung.com>
hf-agent/bluetooth-hf-agent.c
patch
|
blob
|
history
diff --git
a/hf-agent/bluetooth-hf-agent.c
b/hf-agent/bluetooth-hf-agent.c
index
671432c
..
ed9799b
100644
(file)
--- a/
hf-agent/bluetooth-hf-agent.c
+++ b/
hf-agent/bluetooth-hf-agent.c
@@
-1041,6
+1041,11
@@
gboolean __bt_hf_agent_add_queue(GDBusMethodInvocation *context, char *at,
pending_flag ? "TRUE" : "FALSE");
bt_hf_agent_send_at_info *cmd = g_new0(bt_hf_agent_send_at_info, 1);
+ if (!cmd) {
+ ERR("failed to allocate cmd");
+ return FALSE;
+ }
+
cmd->id = ++g_id;
memcpy(cmd->at_cmd, at, count);
cmd->count = count;