Fix some resource leak issue in vim source code