diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-03-12 11:44:38 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-03-12 11:44:38 -0300 |
commit | 1f393331ef64660e614cb21be347b7bebfcff2ed (patch) | |
tree | 377d6ea0ed90b492fb3bdd9a71d979c7b764f5e6 /audio/unix.c | |
parent | c4c03a457df6ad3708bf6abc8ad0a9d7edf3b454 (diff) |
Fix audio plugin initialization failure cases
Diffstat (limited to 'audio/unix.c')
-rw-r--r-- | audio/unix.c | 6 |
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; + } } |