Add script to check memory_leaks

Change-Id: Ie57348415c512fa984999c4beeac852abdf59b74