wpp: Fixed resource leakages (Coverity).