Unless I'm missing something very obvious, this xstrdup seems
unnecessary to me.  We can pass "mode" directly to sprintf.
gdb/gdbserver/ChangeLog:
	* server.c (handle_general_set): Remove unnecessary xstrdup.
+2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * server.c (handle_general_set): Remove unnecessary xstrdup.
+
 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * server.c (parse_debug_format_options): Adjust to
 
        req = TRIBOOL_TRUE;
       else
        {
-         char *mode_copy = xstrdup (mode);
-
          /* We don't know what this mode is, so complain to GDB.  */
          sprintf (own_buf, "E.Unknown thread-events mode requested: %s\n",
-                  mode_copy);
-         xfree (mode_copy);
+                  mode);
          return;
        }