gom: Fix memory leak during migration

The object_types list's ownership is ours when we're called, so
make sure that we clear out the list when we're done with it.