summaryrefslogtreecommitdiff
path: root/hlink.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-03-26 16:46:20 +0000
committerWayne Davison <wayned@samba.org>2004-03-26 16:46:20 +0000
commit028fdddb497b6ac2bdccd270bdd1997704621f3a (patch)
treeb66da92fa49fdb27f8e934fff7f4945b8ce28f61 /hlink.c
parentf86b0f2e7b1b7dcc00509e88880943e83993fe85 (diff)
downloadrsync-028fdddb497b6ac2bdccd270bdd1997704621f3a.tar.gz
rsync-028fdddb497b6ac2bdccd270bdd1997704621f3a.tar.bz2
rsync-028fdddb497b6ac2bdccd270bdd1997704621f3a.zip
Fixed a crash bug when hlink_list is NULL and a link_u.links
pointer in one of the file_struct nodes is not.
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 110e6ede..3ee84335 100644
--- a/hlink.c
+++ b/hlink.c
@@ -135,7 +135,7 @@ void init_hard_links(struct file_list *flist)
int hard_link_check(struct file_struct *file, int skip)
{
- if (!file->link_u.links)
+ if (!hlink_list || !file->link_u.links)
return 0;
if (skip && !(file->flags & FLAG_HLINK_EOL))
hlink_list[file->F_HLINDEX] = file->F_NEXT;