From b9a980505e5c557dedf06d1352b19d3d7b40060f Mon Sep 17 00:00:00 2001 From: Taejin Woo Date: Tue, 29 Dec 2015 17:40:25 +0900 Subject: [PATCH] Fix the Svace issues WGID : 28, 6097 Change-Id: Ifb4ce690655230a922a11d2b99f3b7d901e91b5f Signed-off-by: Taejin Woo --- src/gatt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gatt.c b/src/gatt.c index ff31efe..8ada2e1 100644 --- a/src/gatt.c +++ b/src/gatt.c @@ -764,7 +764,7 @@ gboolean gatt_unregister_internet_protocol_service(struct btd_adapter *adapter) bt_uuid16_create(&uuid, GATT_IPSP_UUID); a = attribute_find(adapter, &uuid); - if (!a) { + if (!a && a->handle != NULL) { error("Attribute not found for handle 0x%04x", a->handle); return FALSE; } @@ -1051,7 +1051,7 @@ struct btd_attribute *btd_gatt_add_char(const bt_uuid_t *uuid, fail: #ifdef __TIZEN_PATCH__ /* Fix : RESOURCE_LEAK */ - if (char_decl->path) + if (char_decl != NULL && char_decl->path != NULL) g_free(char_decl->path); if (char_decl) free(char_decl); -- 2.7.4