From 887697234acea07dbb6c31a1803ea871f7c7cbda Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Thu, 26 May 2016 00:15:26 +0900 Subject: [PATCH] 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 --- src/client/external_sensor_manager.cpp | 1 + 1 file changed, 1 insertion(+) 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)) { -- 2.7.4