summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhay agarwal <ay.agarwal@samsung.com>2019-10-14 12:42:07 +0530
committersaerome.kim <saerome.kim@samsung.com>2019-10-15 21:20:26 +0900
commitf386b8c7fa41c01f67204c2eca78e9480a0b4563 (patch)
treec1616018867a225d560ffd15e397ab21ca7ba386
parenta1609c4025599beea9301131a259c3cb488e9374 (diff)
downloaduser-awareness-f386b8c7fa41c01f67204c2eca78e9480a0b4563.tar.gz
user-awareness-f386b8c7fa41c01f67204c2eca78e9480a0b4563.tar.bz2
user-awareness-f386b8c7fa41c01f67204c2eca78e9480a0b4563.zip
Fixed svace issue.
386398: Dynamic memory referenced by 'name' was allocated by calling function 'ua_service_get_name' at uat-service.c:85 and lost at uat-service.c:97. Change-Id: I06a43c1699632465e05dfe04b104044631f4b1fc Signed-off-by: Abhay agarwal <ay.agarwal@samsung.com>
-rw-r--r--test/uat-service.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/uat-service.c b/test/uat-service.c
index 0446bef..c748bc9 100644
--- a/test/uat-service.c
+++ b/test/uat-service.c
@@ -94,11 +94,12 @@ static bool __foreach_added_service_cb(
if (UA_ERROR_NONE != ret) {
msg(" - ua_service_get_detection_threshold() ret: [0x%X] [%s]",
ret, uat_get_error_str(ret));
+ g_free(name);
return RET_SUCCESS;
}
msgb("[%d] %s ", ++g_service_count, name);
- msgb("presence threshold :[%d] absence threshold :[%d]",
+ msgb("presence threshold :[%d] absence threshold :[%d]",
presence_threshold, absence_threshold);
g_service_list = g_slist_append(g_service_list, service_handle);