gdb: use make_unique_xstrdup in set_inferior_io_terminal
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 25 Jun 2020 21:06:18 +0000 (17:06 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 25 Jun 2020 21:06:18 +0000 (17:06 -0400)
gdb/ChangeLog:

* infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.

Change-Id: I38b6e753f58947531fe4a293d574bc27ec128f47

gdb/ChangeLog
gdb/infcmd.c

index d9b6a49bd1057425a9808c0efec72c792b7fea11..ddb5c47d1e75479e8953b9b8781925c8ab56c797 100644 (file)
@@ -1,3 +1,7 @@
+2020-06-25  Simon Marchi  <simon.marchi@efficios.com>
+
+       * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
+
 2020-06-25  Simon Marchi  <simon.marchi@efficios.com>
 
        * inferior.h (struct inferior) <terminal>: Change type to
index 48d6a91c0c2499ae7fcd4c0aef8f02d6c4da6d34..17f7b9abeac3dd0ef7fce6c73318c8b8ba3eaa82 100644 (file)
@@ -109,7 +109,7 @@ void
 set_inferior_io_terminal (const char *terminal_name)
 {
   if (terminal_name != NULL && *terminal_name != '\0')
-    current_inferior ()->terminal.reset (xstrdup (terminal_name));
+    current_inferior ()->terminal = make_unique_xstrdup (terminal_name);
   else
     current_inferior ()->terminal = NULL;
 }