fix_true_inode(): Fix bug
[wimlib] / src / hardlink.c
index 7603670df55c8083146c15d2090bbe9e8315ef7a..93030d8f7e10e6b89874a089c28da575c63e850d 100644 (file)
@@ -278,6 +278,8 @@ static int fix_true_inode(struct inode *inode, struct hlist_head *inode_list)
                                return WIMLIB_ERR_INVALID_DENTRY;
                        }
                        /* Free the unneeded `struct inode'. */
+                       dentry->d_inode->hlist.next = NULL;
+                       dentry->d_inode->hlist.pprev = NULL;
                        free_inode(dentry->d_inode);
                        dentry->d_inode = ref_inode;
                        ref_inode->link_count++;