audiod: Add a paranoia check to close_writers().
authorAndre Noll <maan@systemlinux.org>
Thu, 14 Jan 2010 22:48:24 +0000 (23:48 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 14 Jan 2010 22:48:24 +0000 (23:48 +0100)
audiod.c

index 2bda0f6..4b2c65f 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -357,6 +357,7 @@ static void close_writers(struct slot_info *s)
 
        if (s->format < 0)
                return;
+       assert(s->wns);
        a = afi + s->format;
        if (a->num_writers == 0)
                writer_cleanup(s->wns);