aboutsummaryrefslogtreecommitdiffstats
path: root/hlink.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-07-20 20:34:06 -0700
committerWayne Davison <wayned@samba.org>2008-07-20 20:34:06 -0700
commitced4fd89932ce510c32e517add56a77bc4b185b2 (patch)
treec300502ca56f31505799f535c1927cc809afb192 /hlink.c
parenteabc85ef5ecd7ed9892ee3d9562468dbb84cbef5 (diff)
downloadandroid_external_rsync-ced4fd89932ce510c32e517add56a77bc4b185b2.tar.gz
android_external_rsync-ced4fd89932ce510c32e517add56a77bc4b185b2.tar.bz2
android_external_rsync-ced4fd89932ce510c32e517add56a77bc4b185b2.zip
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).
Diffstat (limited to 'hlink.c')
-rw-r--r--hlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hlink.c b/hlink.c
index 0fe6beda..ec497096 100644
--- a/hlink.c
+++ b/hlink.c
@@ -184,7 +184,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;