Fix memleaks on master and wall processes

Change-Id: I17224a47c5a5d1c67abf7acf05d6c60de016fc0c