The branch, b3.0.x has been updated
       via  510c5ab Fix xattr memory leak.  Fixes bug 8475.
      from  033697d Make --delete-excluded work better with --filter=merge.

;a=shortlog;h=b3.0.x


- Log -----------------------------------------------------------------
commit 510c5ab7ff0c6b2d0d8794e285259238234c4b96
Author: Wayne Davison <way...@samba.org>
Date:   Thu Sep 22 09:02:21 2011 -0700

    Fix xattr memory leak.  Fixes bug 8475.

-----------------------------------------------------------------------

Summary of changes:
 xattrs.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/xattrs.c b/xattrs.c
index 7b5c1b1..d4c3c3b 100644
--- a/xattrs.c
+++ b/xattrs.c
@@ -93,11 +93,14 @@ static void rsync_xal_free(item_list *xalp)
        size_t i;
        rsync_xa *rxas = xalp->items;
 
+       if (!xalp->malloced)
+               return;
+
        for (i = 0; i < xalp->count; i++) {
                free(rxas[i].datum);
                /*free(rxas[i].name);*/
        }
-       xalp->count = 0;
+       free(xalp->items);
 }
 
 void free_xattr(stat_x *sxp)
@@ -772,10 +775,8 @@ void uncache_tmp_xattrs(void)
                item_list *xattr_start = xattr_item + prior_xattr_count;
                xattr_item += rsync_xal_l.count;
                rsync_xal_l.count = prior_xattr_count;
-               while (xattr_item-- > xattr_start) {
+               while (xattr_item-- > xattr_start)
                        rsync_xal_free(xattr_item);
-                       free(xattr_item->items);
-               }
                prior_xattr_count = (size_t)-1;
        }
 }


-- 
The rsync repository.
_______________________________________________
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs

Reply via email to