Fix memory leak in converting weak_ptr to shared_ptr

llvm-svn: 147298
1 file changed