From 49a98285ed144053c28137c88c72f9992170fafc Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 26 Nov 2003 04:10:08 +0000 Subject: [PATCH] Fixed one more HeapReAlloc call. --- programs/winedbg/debug.l | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l index 6c8a59252fd..83a6efe2fdd 100644 --- a/programs/winedbg/debug.l +++ b/programs/winedbg/debug.l @@ -316,8 +316,12 @@ char* DEBUG_MakeSymbol(const char* symbol) assert(0 <= next_symbol && next_symbol < alloc_symbol + 1); if (next_symbol >= alloc_symbol) { - local_symbols = HeapReAlloc(GetProcessHeap(), 0, local_symbols, - (alloc_symbol += 32) * sizeof(local_symbols[0])); + if (!local_symbols) + local_symbols = HeapAlloc(GetProcessHeap(), 0, + (alloc_symbol += 32) * sizeof(local_symbols[0])); + else + local_symbols = HeapReAlloc(GetProcessHeap(), 0, local_symbols, + (alloc_symbol += 32) * sizeof(local_symbols[0])); assert(local_symbols); } return local_symbols[next_symbol++] = DBG_strdup(symbol);