fix: big memory leaks.

Signed-off-by: Stephen L. <lrq3000@gmail.com>