fix memory leak in client side

Signed-off-by: Ruoyu <liangry@ucweb.com>