It would be good to name this function (and the alloc function) more consistently with the struct name, i.e. func_kobj_free and func_kobj_alloc