Also zero custom_cli_ext_records_count? Otherwise if the return value is ignored and a later realloc succeeds ... bang!