SERVER-11542 fixed coverity warning on potential resource leak