From: Eric Biggers Date: Tue, 14 May 2013 03:32:03 +0000 (-0500) Subject: rename_wim_path(): Free full paths in renamed trees X-Git-Tag: v1.4.0~66 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=7b36eb8076864060c623f1e39bdf26b363eaa2e5;hp=5684d46f92ac65ace1e8b45fb0e007f9efa0dfee rename_wim_path(): Free full paths in renamed trees --- 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; }