winedbg: Fix a memory leak.

This commit is contained in:
Andrew Talbot 2007-10-23 18:06:30 +01:00 committed by Alexandre Julliard
parent da5a398cc3
commit d275a4d3af
1 changed files with 2 additions and 2 deletions

View File

@ -70,9 +70,9 @@ void source_add_path(const char* path)
size = strlen(path) + 1;
if (search_path)
{
unsigned pos = HeapSize(GetProcessHeap(), 0, search_path);
unsigned pos = strlen(search_path) + 1;
new = HeapReAlloc(GetProcessHeap(), 0, search_path, pos + size);
if (!new || !pos) return;
if (!new) return;
new[pos - 1] = ';';
strcpy(&new[pos], path);
}