Simplify OOM handling in ldconfig.