Fix leaks in SkSurface_Gpu.cpp

https://codereview.appspot.com/6826046/



git-svn-id: http://skia.googlecode.com/svn/trunk@6244 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 3c1842a..34031f2 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -92,7 +92,7 @@
         desc.fConfig = SkBitmapConfig2GrPixelConfig(fDevice->config());
         desc.fSampleCnt = 0;
 
-        GrTexture* tex = fDevice->context()->createUncachedTexture(desc, NULL, 0);
+        SkAutoTUnref<GrTexture> tex(fDevice->context()->createUncachedTexture(desc, NULL, 0));
         if (NULL == tex) {
             SkTextureImageSetTexture(image, NULL);
             return;
@@ -131,7 +131,7 @@
     desc.fConfig = SkBitmapConfig2GrPixelConfig(config);
     desc.fSampleCnt = sampleCount;
 
-    GrTexture* tex = ctx->createUncachedTexture(desc, NULL, 0);
+    SkAutoTUnref<GrTexture> tex(ctx->createUncachedTexture(desc, NULL, 0));
     if (NULL == tex) {
         return NULL;
     }