Fix memory leak by using Path::Iterator::Rule

Change-Id: I16967fb0801e2be0491e61c6dfaa28a4ebc4b742
6 files changed