Module: kamailio
Branch: 4.4
Commit: 76765a2e5ca9649d19c3b49a5122e4eaa68e8778
URL:
https://github.com/kamailio/kamailio/commit/76765a2e5ca9649d19c3b49a5122e4e…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: 2017-01-30T15:26:30-05:00
kazoo: fix compiler warning: âjson_objâ may be used uninitialized in this function
[-Wuninitialized]
- closes #954
---
Modified: modules/kazoo/kz_amqp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/76765a2e5ca9649d19c3b49a5122e4e…
Patch:
https://github.com/kamailio/kamailio/commit/76765a2e5ca9649d19c3b49a5122e4e…
---
diff --git a/modules/kazoo/kz_amqp.c b/modules/kazoo/kz_amqp.c
index 2b8a5e9..69127cf 100644
--- a/modules/kazoo/kz_amqp.c
+++ b/modules/kazoo/kz_amqp.c
@@ -2496,13 +2496,14 @@ void kz_send_targeted_cmd(int server_id, amqp_bytes_t body)
kz_amqp_cmd_ptr cmd = NULL;
json_object* JObj = NULL;
char* payload = kz_local_amqp_bytes_dup(body);
+ json_obj_ptr json_obj = NULL;
if(payload == NULL) {
LM_ERR("error allocating message payload\n");
goto error;
}
- json_obj_ptr json_obj = kz_json_parse(payload );
+ json_obj = kz_json_parse(payload );
if (json_obj == NULL) {
LM_ERR("error parsing json payload\n");
goto error;