diff options
Diffstat (limited to 'chardev')
-rw-r--r-- | chardev/char-socket.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 7cd0ae2824..a75b46d9fe 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -423,8 +423,12 @@ static void update_disconnected_filename(SocketChardev *s) Chardev *chr = CHARDEV(s); g_free(chr->filename); - chr->filename = SocketAddress_to_str("disconnected:", s->addr, - s->is_listen, s->is_telnet); + if (s->addr) { + chr->filename = SocketAddress_to_str("disconnected:", s->addr, + s->is_listen, s->is_telnet); + } else { + chr->filename = g_strdup("disconnected:socket"); + } } /* NB may be called even if tcp_chr_connect has not been |