projects
/
platform
/
core
/
connectivity
/
bluetooth-frwk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix coverty issues
[platform/core/connectivity/bluetooth-frwk.git]
/
bt-service
/
services
/
mesh
/
bt-service-mesh-cdb.c
diff --git
a/bt-service/services/mesh/bt-service-mesh-cdb.c
b/bt-service/services/mesh/bt-service-mesh-cdb.c
index
c3abc19
..
cdf1ab8
100644
(file)
--- a/
bt-service/services/mesh/bt-service-mesh-cdb.c
+++ b/
bt-service/services/mesh/bt-service-mesh-cdb.c
@@
-1609,8
+1609,10
@@
bool _bt_mesh_conf_add_model_config_data(_bt_mesh_cdb_t *cfg, uint16_t unicast,
if (!jgroup)
return false;
if (!jgroup)
return false;
- if (!__mesh_write_uint16_hex(jgroup, "sub-addr", group_addr))
+ if (!__mesh_write_uint16_hex(jgroup, "sub-addr", group_addr)) {
+ json_object_put(jgroup);
return false;
return false;
+ }
json_object_array_add(jgroups, jgroup);
json_object_array_add(jgroups, jgroup);
@@
-1727,8
+1729,10
@@
bool _bt_mesh_conf_overwrite_model_config_data(_bt_mesh_cdb_t *cfg, uint16_t uni
if (!jgroup)
return false;
if (!jgroup)
return false;
- if (!__mesh_write_uint16_hex(jgroup, "sub-addr", group_addr))
+ if (!__mesh_write_uint16_hex(jgroup, "sub-addr", group_addr)) {
+ json_object_put(jgroup);
return false;
return false;
+ }
json_object_array_add(jgroups, jgroup);
json_object_array_add(jgroups, jgroup);