sensord: fix the memory leak when get_data is failed 29/64529/1
authorkibak.yoon <kibak.yoon@samsung.com>
Mon, 28 Mar 2016 15:39:13 +0000 (00:39 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Fri, 1 Apr 2016 13:44:42 +0000 (22:44 +0900)
commit6727cdb51fe467afc1c14cc45bafc53f62e14d4c
treeef7fb03823d3923e10ae3eb9e9ec7a1f53be70f1
parent94b72107b73db96727e7dd96ac6fa37d2613f941
sensord: fix the memory leak when get_data is failed

 - problem: if sensor->get_data() is failed, event memory is not freed.
            so there is memory-leak problem.
 - solution: the allocation code of the event meory is moved when it is needed.

Change-Id: If42ab454c269ceab2ed64a13a9915cab23a2822e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/server/sensor_event_poller.cpp