Bladeren bron

DMQ: dmq_notification_address_list is initialized to NULL

This code led to random and unpredictable behaviour when loading a configuration with
multiple notification nodes.
Olle E. Johansson 2 jaren geleden
bovenliggende
commit
5c90e6e288
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/modules/dmq/dmq.c

+ 1 - 1
src/modules/dmq/dmq.c

@@ -379,7 +379,7 @@ static int dmq_add_notification_address(modparam_t type, void * val)
 	}
 
 	/* initial allocation */
-	if (dmq_notification_address_list == 0) {
+	if (dmq_notification_address_list == NULL) {
 		dmq_notification_address_list = pkg_malloc(sizeof(str_list_t));
 		if (dmq_notification_address_list == NULL) {
 			PKG_MEM_ERROR;