More Coverity fixes

This contains a revert of the free in yaml plugins since AFAIU the keys and values are not copied but their address is passed, please review.