Fix the svace issue (Memory Leak) 19/240719/1 accepted/tizen/unified/20200818.130019 submit/tizen/20200814.005740
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 11 Aug 2020 02:30:34 +0000 (11:30 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 11 Aug 2020 02:30:34 +0000 (11:30 +0900)
Change-Id: I2762fcba3b73882890f983021ee4958ca2acbfa0
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
app/obex-event-handler.c

index 1bd4fb0..1c3081d 100644 (file)
@@ -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;
                                }