From patchwork Thu Nov 29 18:27:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [prefix.c] : 4 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32 Date: Thu, 29 Nov 2012 08:27:54 -0000 From: Kai Tietz X-Patchwork-Id: 202803 Message-Id: To: Ian Lance Taylor Cc: GCC Patches Fine. Tested patch using XNEWVEC/XRESIZEVEC for this. Ok for apply? Kai Index: prefix.c =================================================================== --- prefix.c (Revision 193939) +++ prefix.c (Arbeitskopie) @@ -157,12 +157,12 @@ lookup_key (char *key) } size = 32; - dst = xmalloc (size); + dst = XNEWVEC (char, size); res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size); if (res == ERROR_MORE_DATA && type == REG_SZ) { - dst = xrealloc (dst, size); + dst = XRESIZEVEC (char, dst, size); res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size); }