Hide Forgot
Description of problem: qtree_read_dquot() calls smalloc(info->dqi_entry_size) to allocate memory that is never freed afterwards. Version-Release number of selected component (if applicable): quota-3.17-14.el6
You are right. The ddquot buffer is allocated, under a condition filled by data and its content parsed and copied into dquot, and then the function exits. So the ddquot buffer should be freed before return. Upstream development version is affected too.
The same bug is in qtree_write_dquot() in the same file.
Reported to upstream with a proposed fix.
(In reply to comment #5) > The same bug is in qtree_write_dquot() in the same file. You are right. Neither v2r0_mem2diskdqblk(), nor v2r1_mem2diskdqblk() frees the allocated memory.
Created attachment 483694 [details] Fix ddquot buffer leak Fix submitted to upstream, it applies to RHEL-6 version cleanly, leaks in both functions are covered.
Hi, I am reviewing and editing erratum: http://errata.devel.redhat.com/errata/stateview/10703 and would need some more details for this bug to state all the necessary points. Could you give a few key words to the points I pasted into the Technical Notes field. Once I have the text I can start on the approval process. Thanks
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause What actions or circumstances cause this bug to present. Consequence What happens when the bug presents. Fix What was done to fix the bug. Result What now happens when the actions or circumstances above occur. Note: this is not the same as the bug doesn’t present anymore.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,9 +1,14 @@ Cause - What actions or circumstances cause this bug to present. + Processing vsfv1 quota file by quota tools (quota, + quotacheck) on file system with disabled quota + enforcing caused memory leaks. Consequence - What happens when the bug presents. + Processing huge vfsv1 quota file or handling RPC + queries on vfsv1 file system with disabled quota + enforcing by rpc.rquotad repeatedly for long time + period could consume lot of physical memory. Fix - What was done to fix the bug. + When processing vfsv1 quota file, memory is freed + properly once it's not needed anymore. Result - What now happens when the actions or circumstances above occur. + No memory leaks occur.- Note: this is not the same as the bug doesn’t present anymore.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0716.html