aboutsummaryrefslogtreecommitdiff
path: root/gdb/serial.c
diff options
context:
space:
mode:
authorRob Savoye <rob@cygnus>1993-06-09 01:18:26 +0000
committerRob Savoye <rob@cygnus>1993-06-09 01:18:26 +0000
commitf7630ec9c5484b21cddcf50beb1042bffc9160a2 (patch)
treea45ecf371ca98dd2250ed9a7b6e9a117a3f04fc1 /gdb/serial.c
parent86a5593e9ca49ebe907da6371ec90e95377cd45f (diff)
downloadgdb-f7630ec9c5484b21cddcf50beb1042bffc9160a2.zip
gdb-f7630ec9c5484b21cddcf50beb1042bffc9160a2.tar.gz
gdb-f7630ec9c5484b21cddcf50beb1042bffc9160a2.tar.bz2
* serial.c (serial_close): If scb is NULL, don't try to close
it. * configure.in: Add support for rom68k and bug boot monitors.
Diffstat (limited to 'gdb/serial.c')
-rw-r--r--gdb/serial.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/serial.c b/gdb/serial.c
index 0e5a064..005c946 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -116,9 +116,11 @@ serial_close(scb)
{
last_serial_opened = NULL;
- scb->ops->close(scb);
-
- free(scb);
+ if (scb != NULL)
+ {
+ scb->ops->close(scb);
+ free(scb);
+ }
}
#if 0