[PATCH] Free object allocated at quorum_register_callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 exec/vsf_quorum.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/exec/vsf_quorum.c b/exec/vsf_quorum.c
index 7a20a45..2a3a263 100644
--- a/exec/vsf_quorum.c
+++ b/exec/vsf_quorum.c
@@ -238,6 +238,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;
 		}
 	}
-- 
1.8.4.2

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss




[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux