Fixed some possible memory leakages.  Refs #7362.