The freeing happens only if dofree was set to true while calling get_feature_vector, but yeah, I'll recheck these parts