[Fix] Fix a memory leak in Setting.cpp.
[Fix] Fix a memory leak in PlayerSelectionRule.cpp.
Merge pull request #5974 from ace20022/mem_leaks

[Fix] Fix two memory leaks