diff options
Diffstat (limited to 'binding/wrap-unicens')
-rw-r--r-- | binding/wrap-unicens/wrap-unicens.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/binding/wrap-unicens/wrap-unicens.c b/binding/wrap-unicens/wrap-unicens.c index 84b94cd..e27d999 100644 --- a/binding/wrap-unicens/wrap-unicens.c +++ b/binding/wrap-unicens/wrap-unicens.c @@ -154,6 +154,10 @@ extern int wrap_ucs_i2cwrite_sync(uint16_t node, uint8_t *data_ptr, uint8_t data j_array = json_object_new_array(); if(! j_query || ! j_array) { + if (j_query) + json_object_put(j_query); + if (j_array) + json_object_put(j_array); AFB_API_ERROR(api_handle_, "Failed to create writei2c json objects"); return -1; } |