several mem leak bug fix; better code for clientmgmt
Authored by: lilyco 2010-10-22
Parent: [r553]
Child: [r555]