Revert pool_alloc's use of bomb if pool == NULL.
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index 873ffb8..51584f2 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -659,10 +659,8 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags,
 #if SUPPORT_HARD_LINKS
        if (preserve_hard_links && protocol_version < 28 && S_ISREG(mode))
                flags |= XMIT_HAS_IDEV_DATA;
-       if (flags & XMIT_HAS_IDEV_DATA && flist->hlink_pool) {
+       if (flags & XMIT_HAS_IDEV_DATA) {
                INO64_T inode;
-               file->link_u.idev = pool_talloc(flist->hlink_pool,
-                   struct idev, 1, "inode_table");
                if (protocol_version < 26) {
                        dev = read_int(f);
                        inode = read_int(f);
@@ -672,6 +670,8 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags,
                        inode = read_longint(f);
                }
                if (flist->hlink_pool) {
+                       file->link_u.idev = pool_talloc(flist->hlink_pool,
+                           struct idev, 1, "inode_table");
                        file->F_INODE = inode;
                        file->F_DEV = dev;
                }