summaryrefslogtreecommitdiffstats
path: root/audio/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/unix.c')
-rw-r--r--audio/unix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/unix.c b/audio/unix.c
index 575617b3..e455c4e3 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -1275,6 +1275,8 @@ void unix_exit(void)
{
g_slist_foreach(clients, (GFunc) client_free, NULL);
g_slist_free(clients);
- close(unix_sock);
- unix_sock = -1;
+ if (unix_sock >= 0) {
+ close(unix_sock);
+ unix_sock = -1;
+ }
}