From: Andre Noll Date: Sun, 11 Feb 2007 23:03:25 +0000 (+0100) Subject: audiod.c: fix memory leak in audiod_status_dump() X-Git-Tag: v0.2.15~8 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=3bcbbeb2728a1362e27d80e059830e4aeb8007cb;p=paraslash.git audiod.c: fix memory leak in audiod_status_dump() missing free() for decoder flags. Quite serious: We leaked some bytes on each status change. --- diff --git a/audiod_command.c b/audiod_command.c index 524fb57d..77a0a1ee 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -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