Parcourir la source

Fix some iterator based mem leaks

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Angus Salkeld il y a 14 ans
Parent
commit
7ef81f1235
2 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 1 0
      exec/ipc_glue.c
  2. 2 0
      exec/totemconfig.c

+ 1 - 0
exec/ipc_glue.c

@@ -453,6 +453,7 @@ static int32_t cs_ipcs_connection_closed (qb_ipcs_connection_t *c)
 	while ((key_name = icmap_iter_next(iter, NULL, NULL)) != NULL) {
 	while ((key_name = icmap_iter_next(iter, NULL, NULL)) != NULL) {
 		icmap_delete(key_name);
 		icmap_delete(key_name);
 	}
 	}
+	icmap_iter_finalize(iter);
 	free(cnx->icmap_path);
 	free(cnx->icmap_path);
 
 
 	icmap_inc("runtie.connections.closed");
 	icmap_inc("runtie.connections.closed");

+ 2 - 0
exec/totemconfig.c

@@ -300,10 +300,12 @@ extern int totem_config_read (
 						str, 0);
 						str, 0);
 			}
 			}
 		}
 		}
+		icmap_iter_finalize(member_iter);
 
 
 		totem_config->interfaces[ringnumber].member_count = member_count;
 		totem_config->interfaces[ringnumber].member_count = member_count;
 		totem_config->interface_count++;
 		totem_config->interface_count++;
 	}
 	}
+	icmap_iter_finalize(iter);
 
 
 	totem_config->transport_number = TOTEM_TRANSPORT_UDP;
 	totem_config->transport_number = TOTEM_TRANSPORT_UDP;
 	if (icmap_get_string("totem.transport", &str) == CS_OK) {
 	if (icmap_get_string("totem.transport", &str) == CS_OK) {