projects
/
platform
/
core
/
api
/
bluetooth.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ebfb9b
)
Fix coverity issue: Incorrect deallocator used
68/224868/1
author
himanshu
<h.himanshu@samsung.com>
Thu, 13 Feb 2020 13:06:32 +0000
(18:36 +0530)
committer
himanshu
<h.himanshu@samsung.com>
Thu, 13 Feb 2020 13:06:32 +0000
(18:36 +0530)
The client_s structure is allocated with
g_malloc0 therefore it must be freed with
g_free.
Change-Id: I12565ab60228c2828c3b9effcfc7c7c8694d2c64
Signed-off-by: himanshu <h.himanshu@samsung.com>
src/bluetooth-gatt.c
patch
|
blob
|
history
diff --git
a/src/bluetooth-gatt.c
b/src/bluetooth-gatt.c
index
e94df0a
..
e104286
100644
(file)
--- a/
src/bluetooth-gatt.c
+++ b/
src/bluetooth-gatt.c
@@
-3422,7
+3422,7
@@
int bt_gatt_client_create(const char *remote_address, bt_gatt_client_h *client)
client_s->remote_address = g_strdup(remote_address);
if (client_s->remote_address == NULL) {
- free(client_s);
+
g_
free(client_s);
ret = BT_ERROR_OUT_OF_MEMORY;
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
return ret;