From 7b36eb8076864060c623f1e39bdf26b363eaa2e5 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 13 May 2013 22:32:03 -0500 Subject: [PATCH 1/1] rename_wim_path(): Free full paths in renamed trees --- src/update_image.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/update_image.c b/src/update_image.c index a6bad2aa..9453f2e0 100644 --- a/src/update_image.c +++ b/src/update_image.c @@ -334,6 +334,14 @@ execute_delete_command(WIMStruct *wim, return 0; } +static int +free_dentry_full_path(struct wim_dentry *dentry, void *_ignore) +{ + FREE(dentry->_full_path); + dentry->_full_path = NULL; + return 0; +} + /* * Rename a file or directory in the WIM. * @@ -394,6 +402,8 @@ rename_wim_path(WIMStruct *wim, const tchar *from, const tchar *to) } unlink_dentry(src); dentry_add_child(parent_of_dst, src); + if (src->_full_path) + for_dentry_in_tree(src, free_dentry_full_path, NULL); return 0; } -- 2.43.0