object-file: fix SEGV on free() regression in v2.34.0-rc2