diff options
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 27d6042..fbbc159 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1679,12 +1679,7 @@ do_start_initialization () std::string oldloc = setlocale (LC_ALL, NULL); setlocale (LC_ALL, ""); progsize = strlen (progname.get ()); - progname_copy = (wchar_t *) xmalloc ((progsize + 1) * sizeof (wchar_t)); - if (!progname_copy) - { - fprintf (stderr, "out of memory\n"); - return false; - } + progname_copy = XNEWVEC (wchar_t, progsize + 1); count = mbstowcs (progname_copy, progname.get (), progsize + 1); if (count == (size_t) -1) { |