[Fix] Fix two memory leaks