Module: kamailio
Branch: 4.4
Commit: 1114fe01abdb791379274b4f388317d600d72e38
URL:
https://github.com/kamailio/kamailio/commit/1114fe01abdb791379274b4f388317d…
Author: lazedo <luis.azedo(a)factorlusitano.com>
Committer: GitHub <noreply(a)github.com>
Date: 2017-01-18T09:19:44Z
kazoo: fix kz_amqp_add_zone
---
Modified: modules/kazoo/kz_amqp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1114fe01abdb791379274b4f388317d…
Patch:
https://github.com/kamailio/kamailio/commit/1114fe01abdb791379274b4f388317d…
---
diff --git a/modules/kazoo/kz_amqp.c b/modules/kazoo/kz_amqp.c
index feac047..2b8a5e9 100644
--- a/modules/kazoo/kz_amqp.c
+++ b/modules/kazoo/kz_amqp.c
@@ -449,10 +449,10 @@ kz_amqp_zone_ptr kz_amqp_add_zone(char* zone) {
kz_amqp_zone_ptr zone_ptr = (kz_amqp_zone_ptr) shm_malloc(sizeof(kz_amqp_zone));
memset(zone_ptr, 0, sizeof(kz_amqp_zone));
zone_ptr->zone = shm_malloc(strlen(zone)+1);
- memset(zone_ptr->servers, 0, sizeof(kz_amqp_servers));
strcpy(zone_ptr->zone, zone);
zone_ptr->zone[strlen(zone)] = '\0';
zone_ptr->servers = (kz_amqp_servers_ptr) shm_malloc(sizeof(kz_amqp_servers));
+ memset(zone_ptr->servers, 0, sizeof(kz_amqp_servers));
kz_zones->tail->next = zone_ptr;
kz_zones->tail = zone_ptr;
return zone_ptr;