Fix access of freed memory in namehints
Fix access of freed memory in namehints

Sometimes a hook manipulates the config tree, which makes currently
running iterators point to freed memory. As a workaround, make two
copies, one for the iterators and another for the hooks.

BugLink: https://bugs.launchpad.net/bugs/1008600
Signed-off-by: David Henningsson <9fb354e0a5603a0331399c18f4aa5aab2f9d9c5b@canonical.com>
Signed-off-by: Takashi Iwai <4596b3305151c7ee743192a95d394341e3d3b644@suse.de>

zedongchen/alsa-lib,lgirdwood/alsa-lib,mengdonglin/alsa-lib,lgirdwood/alsa-lib,takaswie/alsa-lib,mengdonglin/alsa-lib,tiwai/alsa-lib,takaswie/alsa-lib,mengdonglin/alsa-lib,mengdonglin/alsa-lib,tiwai/alsa-lib,alsa-project/alsa-lib,Distrotech/alsa-lib,mikelima/alsa-lib,zedongchen/alsa-lib,Distrotech/alsa-lib,Distrotech/alsa-lib,lgirdwood/alsa-lib,takaswie/alsa-lib,takaswie/alsa-lib,tiwai/alsa-lib,mikelima/alsa-lib,mikelima/alsa-lib,takaswie/alsa-lib,Distrotech/alsa-lib,Distrotech/alsa-lib,zedongchen/alsa-lib,mikelima/alsa-lib,zedongchen/alsa-lib,mikelima/alsa-lib,alsa-project/alsa-lib,alsa-project/alsa-lib,tiwai/alsa-lib,zedongchen/alsa-lib,lgirdwood/alsa-lib,alsa-project/alsa-lib,mengdonglin/alsa-lib,lgirdwood/alsa-lib