main-volume-policy, volume-api: Fix memory leaks

Change-Id: I363324dbb2c210be73c164ff4243c54e02297e25