Red Hat Bugzilla – Full Text Bug Listing
|Summary:||Fix memleak in nfs mount|
|Product:||[Community] GlusterFS||Reporter:||Harshavardhana <fharshav>|
|Component:||nfs||Assignee:||Shehjar Tikoo <shehjart>|
|Status:||CLOSED NOTABUG||QA Contact:|
|Version:||mainline||CC:||amarts, cww, gluster-bugs|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Shehjar Tikoo 2010-04-14 21:11:07 EDT
That function is called as a result of showmount -e <nfsserver>. For the record: addrstr contains a strdup'ed address that is assigned to elist->ex_groups->gr_name. On any failure inside this function, xdr_free_exports_list is called, which goes through the elist to free up the memory assigned to elist->ex_groups->gr_name. Harsha, can you please send me the valgrind output file?
Comment 1 Harshavardhana 2010-04-14 21:44:28 EDT
> elist->ex_groups->gr_name. On any failure inside this function, > xdr_free_exports_list is called, which goes through the elist to free up the > memory assigned to elist->ex_groups->gr_name. > > > Harsha, can you please send me the valgrind output file? Valgrind "virtual" machine was deleted due to some space constraints. [harsha@sysrq src]$ cppcheck --enable=exceptNew,exceptRealloc,possibleError,unusedFunctions mount3.c Checking mount3.c... [mount3.c:755]: (error) Memory leak: addrstr Checking usage of global functions.. [harsha@sysrq src]$
Comment 2 Harshavardhana 2010-04-14 22:03:55 EDT
Found a memleak with valgrind and cppcheck that addrstr which was strduped never went free. Looks like every export list build had a leak. Not sure how many times such things are called.