From: Ali Tamur Date: Mon, 21 Oct 2019 23:34:19 +0000 (-0700) Subject: Fix find_charset_names. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1834d45f0ff231bf74de3b0305949cf991470a35;p=binutils-gdb.git Fix find_charset_names. The patch f2aec7f6d14 changed the return type of relocate_gdb_directory to std::string, but the change is not reflected in find_charset_names function. (Probably missed because the broken code is behind an #ifdef). gdb/ChangeLog * charset.c (find_charset_names): Reflect API change. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 55c46473ab3..9acc579f1ee 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-10-25 Ali Tamur + + * charset.c (find_charset_names): Reflect API change. + 2019-10-25 Christian Biesinger * symtab.c (struct demangled_name_entry): Change demangled name diff --git a/gdb/charset.c b/gdb/charset.c index 7568e47cf9a..a93fe99c41f 100644 --- a/gdb/charset.c +++ b/gdb/charset.c @@ -816,10 +816,9 @@ find_charset_names (void) #ifdef ICONV_BIN { - char *iconv_dir = relocate_gdb_directory (ICONV_BIN, - ICONV_BIN_RELOCATABLE); - iconv_program = concat (iconv_dir, SLASH_STRING, "iconv", NULL); - xfree (iconv_dir); + std::string iconv_dir = relocate_gdb_directory (ICONV_BIN, + ICONV_BIN_RELOCATABLE); + iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", NULL); } #else iconv_program = xstrdup ("iconv");