[Bugs] [Bug 1287517] Memory leak in glusterd

bugzilla at redhat.com bugzilla at redhat.com
Tue Dec 22 14:52:29 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1287517



--- Comment #27 from Roman Tereshonkov <tereshonkov.roman at gmail.com> ---
The attached patch fixes the problem partially.
It reduces the memory leaks by about 5 times.
I did not observe any visible leaks on host sending "glusterd volume status
all" command.
But the receiving host still has some small leaks.

I suspect the problem is somewhere in glusterd-op-sm.c file.
The volume status command initiates two transactions. 
For each transaction glusterd_set_txn_opinfo function is called and 
opinfo_obj = GF_CALLOC (1, sizeof(glusterd_txn_opinfo_obj),
gf_common_mt_txn_opinfo_obj_t);
memory is allocated.
On finnishing glusterd_clear_txn_opinfo function is called to free allocated
memory. But it happens only once for the second transaction.
So memory allocated for the first transaction is kept unallocated.

Can anybody check this and review?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=AWU5cW7Vm4&a=cc_unsubscribe


More information about the Bugs mailing list