From c7f1c7e38a23290bd5edd2a70c234875cc299901 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 12 May 2013 01:09:44 -0500 Subject: [PATCH] Update bug fixes --- src/hardlink.c | 1 - src/lookup_table.c | 4 +++- src/update_image.c | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/hardlink.c b/src/hardlink.c index 53d03ecd..90446f98 100644 --- a/src/hardlink.c +++ b/src/hardlink.c @@ -550,7 +550,6 @@ inode_table_prepare_inode_list(struct wim_inode_table *table, inode->i_ino = cur_ino++; else inode->i_ino = 0; - list_add_tail(&inode->i_list, head); } for (size_t i = 0; i < table->capacity; i++) { diff --git a/src/lookup_table.c b/src/lookup_table.c index e2ca5920..e2ce02e7 100644 --- a/src/lookup_table.c +++ b/src/lookup_table.c @@ -240,7 +240,9 @@ lte_decrement_refcnt(struct wim_lookup_table_entry *lte, wimlib_assert(lte != NULL); wimlib_assert(lte->refcnt != 0); if (--lte->refcnt == 0) { - if (!lte->unhashed) + if (lte->unhashed) + list_del(<e->unhashed_list); + else lookup_table_unlink(table, lte); #ifdef WITH_FUSE if (lte->num_opened_fds == 0) diff --git a/src/update_image.c b/src/update_image.c index 650dfbbd..788cd9e5 100644 --- a/src/update_image.c +++ b/src/update_image.c @@ -295,6 +295,8 @@ execute_delete_command(WIMStruct *wim, flags = delete_cmd->delete.delete_flags; wim_path = delete_cmd->delete.wim_path; + DEBUG("Deleting WIM path \"%"TS"\" (flags=%#x)", wim_path, flags); + tree = get_dentry(wim, wim_path); if (!tree) { /* Path to delete does not exist in the WIM. */ @@ -574,7 +576,7 @@ free_update_commands(struct wimlib_update_command *cmds, size_t num_cmds) { if (cmds) { for (size_t i = 0; i < num_cmds; i++) { - switch (cmds->op) { + switch (cmds[i].op) { case WIMLIB_UPDATE_OP_ADD: FREE(cmds[i].add.fs_source_path); FREE(cmds[i].add.wim_target_path); @@ -587,6 +589,8 @@ free_update_commands(struct wimlib_update_command *cmds, size_t num_cmds) FREE(cmds[i].rename.wim_source_path); FREE(cmds[i].rename.wim_target_path); break; + default: + wimlib_assert(0); } } FREE(cmds); -- 2.43.0