Variable 'data' going out of scope leaks the storage it points to