Fix memory leak #256

Merged
merged 2 commits into from Mar 13, 2013

Conversation

Projects
None yet
2 participants
@yuusuke
Contributor

yuusuke commented Mar 13, 2013

I revised the memory leak that I discovered using valgrind.
Please merge, if there is no problem in correction.

yusuke added some commits Mar 13, 2013

yusuke
Fix: fixed a memory leak in lrmd.
==32476== 20,960 bytes in 10 blocks are definitely lost in loss record 42 of 42
==32476==    at 0x4A04A28: calloc (vg_replace_malloc.c:467)
==32476==    by 0x4E63364: resources_action_create (services.c:106)
==32476==    by 0x404419: lrmd_rsc_dispatch (lrmd.c:858)
==32476==    by 0x4C4A762: crm_trigger_dispatch (mainloop.c:105)
==32476==    by 0x3476438F0D: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.2200.5)
==32476==    by 0x347643C937: ??? (in /lib64/libglib-2.0.so.0.2200.5)
==32476==    by 0x347643CD54: g_main_loop_run (in /lib64/libglib-2.0.so.0.2200.5)
==32476==    by 0x4023C7: main (main.c:303)
yusuke
Fix: fixed a memory leak in crmd.
an example:
==4281==    at 0x4A04A28: calloc (vg_replace_malloc.c:467)
==4281==    by 0x567E70A: crm_ipc_prepare (ipc.c:484)
==4281==    by 0x568043A: crm_ipc_send (ipc.c:1008)
==4281==    by 0x419819: do_pe_invoke_callback (pengine.c:286)
==4281==    by 0x524D5E3: cib_native_callback (cib_utils.c:736)
==4281==    by 0x52538A6: cib_native_dispatch_internal (cib_native.c:120)
==4281==    by 0x569AB6F: mainloop_gio_callback (mainloop.c:585)
==4281==    by 0x3476438F0D: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.2200.5)
==4281==    by 0x347643C937: ??? (in /lib64/libglib-2.0.so.0.2200.5)
==4281==    by 0x347643CD54: g_main_loop_run (in /lib64/libglib-2.0.so.0.2200.5)
==4281==    by 0x40526D: crmd_init (main.c:154)
==4281==    by 0x405598: main (main.c:120)
@beekhof

This comment has been minimized.

Show comment Hide comment
@beekhof

beekhof Mar 13, 2013

Owner

Strange that node of the regression tests found this :-/

Owner

beekhof commented Mar 13, 2013

Strange that node of the regression tests found this :-/

beekhof added a commit that referenced this pull request Mar 13, 2013

@beekhof beekhof merged commit e81387f into ClusterLabs:master Mar 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment