Browse Source

Free object allocated at quorum_register_callback

Memory object allocated with malloc at quorum_register_callback
is not freed. The object is linked to internal_trackers_list.

The object is unlinked at quorum_unregister_callback. However,
it is not freed at the function.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Masatake YAMATO 12 năm trước cách đây
mục cha
commit
06e086c940
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      exec/vsf_quorum.c

+ 1 - 0
exec/vsf_quorum.c

@@ -262,6 +262,7 @@ static int quorum_unregister_callback(quorum_callback_fn_t function, void *conte
 		pd = list_entry(tmp, struct internal_callback_pd, list);
 		if (pd->callback == function && pd->context == context) {
 			list_del(&pd->list);
+			free(pd);
 			return 0;
 		}
 	}