audiod.c: fix memory leak in audiod_status_dump()
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Feb 2007 23:03:25 +0000 (00:03 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 11 Feb 2007 23:03:25 +0000 (00:03 +0100)
missing free() for decoder flags. Quite serious: We leaked some bytes on each
status change.

audiod_command.c

index 524fb57..77a0a1e 100644 (file)
@@ -520,6 +520,7 @@ void audiod_status_dump(void)
        old = stat_task->stat_item_values[SI_DECODER_FLAGS];
        new = decoder_flags();
        if (!old || strcmp(old, new)) {
+               free(old);
                stat_client_write(new, SI_DECODER_FLAGS);
                stat_task->stat_item_values[SI_DECODER_FLAGS] = new;
        } else