Module: wine Branch: master Commit: 3caa27eafbecfa610e07844d2ed1e09a30960f34 URL: https://gitlab.winehq.org/wine/wine/-/commit/3caa27eafbecfa610e07844d2ed1e09...
Author: Alex Henrie alexhenrie24@gmail.com Date: Sat Jun 10 13:06:58 2023 -0600
wusa: Zero out identity on error path in read_identity.
Fixes double frees in read_components and read_dependency. The double frees could also be fixed by using free instead of free_dependency in those functions, but zeroing out the pointers is easier to understand because it ensures that alloc_dependency can always be paired with free_dependency.
---
programs/wusa/manifest.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/programs/wusa/manifest.c b/programs/wusa/manifest.c index 83d4125133f..986bda27cd8 100644 --- a/programs/wusa/manifest.c +++ b/programs/wusa/manifest.c @@ -275,6 +275,7 @@ static BOOL read_identity(IXMLDOMElement *root, struct assembly_identity *identi
error: clear_identity(identity); + memset(identity, 0, sizeof(*identity)); return FALSE; }