gdb/solib-svr4: make svr4_info::debug_loader_name an std::string

Remove some manual memory management.

Change-Id: I9c752d35a70e3659509fed57df1c9a8d27ecc742
Approved-By: Tom Tromey <tom@tromey.com>
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 5a8b08e..b7af602 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -368,7 +368,7 @@ struct svr4_info
   CORE_ADDR debug_loader_offset = 0;
 
   /* Name of the dynamic linker, valid if debug_loader_offset_p.  */
-  char *debug_loader_name = nullptr;
+  std::string debug_loader_name;
 
   /* Load map address for the main executable in default namespace.  */
   CORE_ADDR main_lm_addr = 0;
@@ -2681,7 +2681,7 @@ enable_break (struct svr4_info *info, int from_tty)
 
       if (!loader_found_in_list)
 	{
-	  info->debug_loader_name = xstrdup (interp_name);
+	  info->debug_loader_name = interp_name;
 	  info->debug_loader_offset_p = 1;
 	  info->debug_loader_offset = load_addr;
 	  solib_add (NULL, from_tty, auto_solib_add);
@@ -3341,8 +3341,7 @@ svr4_clear_solib (program_space *pspace)
   info->debug_base = 0;
   info->debug_loader_offset_p = 0;
   info->debug_loader_offset = 0;
-  xfree (info->debug_loader_name);
-  info->debug_loader_name = NULL;
+  info->debug_loader_name.clear ();
 }
 
 /* Clear any bits of ADDR that wouldn't fit in a target-format