+2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
+
+ * linux-nat.c (linux_nat_attach): Remove xstrdup.
+
2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
PR gdb/21559
{
pid_t pid = parse_pid_to_attach (args);
struct buffer buffer;
- char *message, *buffer_s;
-
- message = xstrdup (ex.message);
- make_cleanup (xfree, message);
+ char *buffer_s;
buffer_init (&buffer);
linux_ptrace_attach_fail_reason (pid, &buffer);
make_cleanup (xfree, buffer_s);
if (*buffer_s != '\0')
- throw_error (ex.error, "warning: %s\n%s", buffer_s, message);
+ throw_error (ex.error, "warning: %s\n%s", buffer_s, ex.message);
else
- throw_error (ex.error, "%s", message);
+ throw_error (ex.error, "%s", ex.message);
}
END_CATCH