remove unused parameter from km_free
update tests with new km_free api