[Bug 8475] memory leak around free_xattr() and rsync_xal_free(), with -aX, 200 bytes per file and per directory

samba-bugs at samba.org samba-bugs at samba.org
Thu Sep 22 10:35:43 MDT 2011


https://bugzilla.samba.org/show_bug.cgi?id=8475

Wayne Davison <wayned at samba.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Wayne Davison <wayned at samba.org> 2011-09-22 16:35:42 UTC ---
Looks like rsync_xal_free() was originally written to allow re-use of the
allocated memory (it leaves the malloced value unzeroed along with the "items"
memory), but only one of the 2 callers was freeing the item memory, and neither
was expecting it to stick around.

I have committed a fix that frees the memory and also avoids calling free on
the "items" list if no allocations were done.  I decided to get rid of the
memory clearing, since no callers expect to re-use the allocated area -- one
discards the memory, and the other pre-clears it (using EMPTY_ITEM_LIST) before
each new/reused item is used.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the rsync mailing list