lib: resource-monitor: Fix get_value_string issue by allocating string buffer 95/279295/2
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 2 Aug 2022 06:06:12 +0000 (15:06 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Sun, 7 Aug 2022 20:32:13 +0000 (05:32 +0900)
commit0e052cb2cab204427e49c40f6bb6acf8a4352dab
treed2b9b9383c349c0083ffbde470a1e86ff34b2b03
parent05927f35499cafa5fb89bdeb855a6acaa5fbe380
lib: resource-monitor: Fix get_value_string issue by allocating string buffer

The resource-monitor has the following policy of getting sting value
1. resource-monitor allocate the meory for string value
2. user of resource-monitor have to free the allocated memory

But, pass_resource_monitor_get_value_string didn't allocate
the memory for string value until now. Allocate memory for getting
string value on pass_resource_monitor_get_value_string.

Change-Id: I1517ab4362d754cb75b54d1887c1d031de14787d
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
lib/resource-monitor/resource-monitor.c
lib/resource-monitor/resource-monitor.h
tests/integration-test/resource-monitor-tests.cpp
tools/resource-monitor/resource-monitor.c