Fix memory leak in Provider DataRef