gpu_group.c: populate_array_references: plug memory leak on error path