From: kibak.yoon Date: Wed, 25 May 2016 15:15:26 +0000 (+0900) Subject: sensord: fix double free problem after the allocation of memory is failed X-Git-Tag: accepted/tizen/common/20160627.191141~1^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=887697234acea07dbb6c31a1803ea871f7c7cbda;p=platform%2Fcore%2Fsystem%2Fsensord.git sensord: fix double free problem after the allocation of memory is failed - if the allocation of memory is failed, this function has to be finished. Change-Id: Iea3ca9184812a82b34b3ad3bd299b2d33a382323 Signed-off-by: kibak.yoon --- diff --git a/src/client/external_sensor_manager.cpp b/src/client/external_sensor_manager.cpp index e19b403..9a0b3c4 100644 --- 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)) {