Fixing memory leak in test_integration.

Change-Id: I84e230e46280ef2c2fffa29ce41e9a4102cb7871