 		assert(oldCommitOid != nil || newCommitOid != nil, "It is an error to pass nil for both the oldOid and newOid")
 
 		var oldTree: OpaquePointer? = nil
+		defer { git_object_free(oldTree) }
 		if let oid = oldCommitOid {
 			let result = unsafeTreeForCommitId(oid)
 			guard result.error == nil else {

			}
		}

		defer { git_object_free(mergeDiff) }
		return .success(Diff(mergeDiff!))
	}


			}

			newTree = result.value
		}

		var diff: OpaquePointer? = nil
