git_repository_free() calls git_odb_free() if the owned odb is not null. According to the doc, when setting a new odb through git_repository_set_odb() the caller has to take care of releasing the odb by himself.
Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!