projects
/
platform
/
core
/
system
/
sensord.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df00850
)
sensord: fix double free problem after the allocation of memory is failed
15/71515/2
author
kibak.yoon
<kibak.yoon@samsung.com>
Wed, 25 May 2016 15:15:26 +0000
(
00:15
+0900)
committer
kibak.yoon
<kibak.yoon@samsung.com>
Thu, 26 May 2016 01:54:36 +0000
(10:54 +0900)
- if the allocation of memory is failed, this function has to be finished.
Change-Id: Iea3ca9184812a82b34b3ad3bd299b2d33a382323
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/client/external_sensor_manager.cpp
patch
|
blob
|
history
diff --git
a/src/client/external_sensor_manager.cpp
b/src/client/external_sensor_manager.cpp
index
e19b403
..
9a0b3c4
100644
(file)
--- a/
src/client/external_sensor_manager.cpp
+++ b/
src/client/external_sensor_manager.cpp
@@
-430,6
+430,7
@@
void external_sensor_manager::handle_command(sensor_id_t sensor, char* data, int
if (!cb_info) {
_E("Failed to allocate memory");
delete[] data;
+ return;
}
if (!get_cb_info(sensor, data, data_cnt, *cb_info)) {