From: Wayne Davison Date: Wed, 23 Jul 2008 04:34:20 +0000 (-0700) Subject: Fixed a bug in match_hard_links() where an empty directory would try X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/209371b8915304a2ec1086f19bf97fccedad23e0 Fixed a bug in match_hard_links() where an empty directory would try to allocate 0 bytes of memory (which can fail on some OSes). --- diff --git a/hlink.c b/hlink.c index 1e8adc86..99b4315e 100644 --- a/hlink.c +++ b/hlink.c @@ -179,7 +179,7 @@ static void match_gnums(int32 *ndx_list, int ndx_count) * to first when we're done. */ void match_hard_links(struct file_list *flist) { - if (!list_only) { + if (!list_only && flist->used) { int i, ndx_count = 0; int32 *ndx_list;