]> git.proxmox.com Git - mirror_corosync.git/commitdiff
Free object allocated at quorum_register_callback
authorMasatake YAMATO <yamato@redhat.com>
Sat, 18 Jan 2014 03:18:51 +0000 (03:18 +0000)
committerJan Friesse <jfriesse@redhat.com>
Thu, 23 Jan 2014 16:18:44 +0000 (17:18 +0100)
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>
exec/vsf_quorum.c

index 7a20a45dc71974b4c9c2267201b76037781618ca..2a3a2634b780a04c3d72cad9ab69f98f7de93d9f 100644 (file)
@@ -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;
                }
        }