fusion/tests: Don't use strdup to prevent crashes when freeing memory.

This commit is contained in:
Paul Vriens 2009-02-20 08:14:22 +01:00 committed by Alexandre Julliard
parent 93c4158283
commit ad9fb647b4
1 changed files with 2 additions and 1 deletions

View File

@ -253,7 +253,8 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path)
lstrcatA(disp, buf);
name = HeapAlloc(GetProcessHeap(), 0, sizeof(ASMNAME));
name->data = strdup(disp);
name->data = HeapAlloc(GetProcessHeap(), 0, lstrlenA(disp) + 1);
lstrcpyA(name->data, disp);
list_add_tail(assemblies, &name->entry);
continue;