From: Andre Noll Date: Sat, 6 Jul 2013 20:26:03 +0000 (+0200) Subject: audiod: Fix memory leak on exit: close slots. X-Git-Tag: v0.5.1~11^2~6 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=eec23a69402951596dfcd81825c79d355f7bba0c;hp=eec23a69402951596dfcd81825c79d355f7bba0c;p=paraslash.git audiod: Fix memory leak on exit: close slots. Currently we don't bother to close slots on exit. This is no problem but it causes valgrind to report a bunch of memory leaks. This patch makes it close all writers, filters and receivers on exit. To this aim, the cleanup part of close_unused_slots() is abstracted out into the new close_slot(), which is now also called from clean_exit() for each slot, just before para_audiod exits. In order to avoid forward declarations, clean_exit() had to be moved below the two other functions. ---