diff --git a/modules/dmq/dmq.c b/modules/dmq/dmq.c index 9b0df41def2..d8e7733acaf 100644 --- a/modules/dmq/dmq.c +++ b/modules/dmq/dmq.c @@ -75,12 +75,12 @@ sl_api_t slb; /** module variables */ str dmq_request_method = str_init("KDMQ"); -dmq_worker_t* workers; +dmq_worker_t* workers = NULL; dmq_peer_list_t* peer_list = 0; /* the list of dmq servers */ -dmq_node_list_t* node_list; +dmq_node_list_t* node_list = NULL; // the dmq module is a peer itself for receiving notifications regarding nodes -dmq_peer_t* dmq_notification_peer; +dmq_peer_t* dmq_notification_peer = NULL; /** module functions */ static int mod_init(void); diff --git a/modules/dmq/notification_peer.c b/modules/dmq/notification_peer.c index 2e87c77afd4..ae92e826b3d 100644 --- a/modules/dmq/notification_peer.c +++ b/modules/dmq/notification_peer.c @@ -38,6 +38,8 @@ int *dmq_init_callback_done = 0; int add_notification_peer() { dmq_peer_t not_peer; + + memset(¬_peer, 0, sizeof(dmq_peer_t)); not_peer.callback = dmq_notification_callback; not_peer.init_callback = NULL; not_peer.description.s = "notification_peer";