Fix svace issues 61/88961/1 accepted/tizen/common/20160922.120604 accepted/tizen/ivi/20160922.233147 accepted/tizen/mobile/20160922.233123 accepted/tizen/tv/20160922.233140 accepted/tizen/wearable/20160922.233132 submit/tizen/20160922.015934
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 21 Sep 2016 08:11:32 +0000 (17:11 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 21 Sep 2016 08:11:32 +0000 (17:11 +0900)
Change-Id: If63dc2722cf56bda295d26df5fc56fef76cb0218
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-api/bt-gatt-service.c
bt-service/bt-service-avrcp-controller.c

index 20bffd8..a79cf40 100644 (file)
@@ -329,6 +329,12 @@ static void __bt_gatt_manager_method_call(GDBusConnection *connection,
                        }
                        register_pending_cnt--;
 
+                       if (l1 == NULL) {
+                               BT_ERR("gatt service list is NULL");
+                               g_dbus_method_invocation_return_value(invocation, NULL);
+                               return;
+                       }
+
                        struct gatt_service_info *serv_info = l1->data;
                        if (serv_info == NULL) {
                                BT_ERR("service info value is NULL");
index 2b0bdfc..f443319 100644 (file)
@@ -640,6 +640,10 @@ void _bt_handle_avrcp_control_event(GVariant *reply, const char *path)
                                /* Free key and value because of break unless free not required */
                                free((char *)property);
                                g_variant_unref(value);
+                               g_free((char *)metadata.title);
+                               g_free((char *)metadata.artist);
+                               g_free((char *)metadata.album);
+                               g_free((char *)metadata.genre);
                                break;
                        }