/* Generic serial interface routines
- Copyright (C) 1992-2019 Free Software Foundation, Inc.
+ Copyright (C) 1992-2020 Free Software Foundation, Inc.
This file is part of GDB.
return NULL;
}
+ scb->name = open_name != NULL ? xstrdup (open_name) : NULL;
scb->next = scb_base;
scb_base = scb;
scb = new_serial (ops);
+ scb->name = NULL;
scb->next = scb_base;
scb_base = scb;
if (really_close)
scb->ops->close (scb);
+ xfree (scb->name);
+
/* For serial_is_open. */
scb->bufp = NULL;