From 209371b8915304a2ec1086f19bf97fccedad23e0 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 22 Jul 2008 21:34:20 -0700 Subject: [PATCH] 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). --- hlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1