Просмотр исходного кода

TOTEM: better clean up on exit

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
Angus Salkeld 14 лет назад
Родитель
Сommit
92ca91fa66
2 измененных файлов с 9 добавлено и 2 удалено
  1. 2 1
      exec/totemrrp.c
  2. 7 1
      exec/totemsrp.c

+ 2 - 1
exec/totemrrp.c

@@ -1781,7 +1781,8 @@ int totemrrp_finalize (
 	for (i = 0; i < instance->interface_count; i++) {
 		totemnet_finalize (instance->net_handles[i]);
 	}
-
+	free (instance->net_handles);
+	free (instance);
 	return (0);
 }
 

+ 7 - 1
exec/totemsrp.c

@@ -975,8 +975,14 @@ void totemsrp_finalize (
 {
 	struct totemsrp_instance *instance = (struct totemsrp_instance *)srp_context;
 
+
 	memb_leave_message_send (instance);
-	free (srp_context);
+	totemrrp_finalize (instance->totemrrp_context);
+	cs_queue_free (&instance->new_message_queue);
+	cs_queue_free (&instance->retrans_message_queue);
+	sq_free (&instance->regular_sort_queue);
+	sq_free (&instance->recovery_sort_queue);
+	free (instance);
 }
 
 int totemsrp_ifaces_get (