From 4c15598f559535ca2aa901ce442ca8a0e981bb15 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Tue, 11 Aug 2020 11:30:34 +0900 Subject: [PATCH] Fix the svace issue (Memory Leak) Change-Id: I2762fcba3b73882890f983021ee4958ca2acbfa0 Signed-off-by: DoHyun Pyun --- app/obex-event-handler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/obex-event-handler.c b/app/obex-event-handler.c index 1bd4fb0..1c3081d 100644 --- a/app/obex-event-handler.c +++ b/app/obex-event-handler.c @@ -663,11 +663,14 @@ static inline void _bt_event_opc_connected(bluetooth_event_param_t *param, while (ad->tr_next_data != NULL) { info = (bt_tr_data_t *)(ad->tr_next_data)->data; - if (info == NULL) + if (info == NULL) { + g_free(uids); return; + } INFO("info->sid = %d info->id = %d", info->sid, info->id); if (info->sid != s_id) { DBG("SID did not match so break done."); + g_free(uids); return; } -- 2.7.4