| Index: ui/gfx/x/x11_types.cc
 | 
| diff --git a/ui/gfx/x/x11_types.cc b/ui/gfx/x/x11_types.cc
 | 
| index 54a0816c65236121dd6852a21a87777f03b43efb..e74129e216a77cc8d2bd80c45c5f45a39fcc3672 100644
 | 
| --- a/ui/gfx/x/x11_types.cc
 | 
| +++ b/ui/gfx/x/x11_types.cc
 | 
| @@ -45,20 +45,16 @@ void PutARGBImage(XDisplay* display,
 | 
|  
 | 
|  int BitsPerPixelForPixmapDepth(XDisplay* dpy, int depth) {
 | 
|    int count;
 | 
| -  XPixmapFormatValues* formats = XListPixmapFormats(dpy, &count);
 | 
| +  XScopedPtr<XPixmapFormatValues[]> formats(XListPixmapFormats(dpy, &count));
 | 
|    if (!formats)
 | 
|      return -1;
 | 
|  
 | 
| -  int bits_per_pixel = -1;
 | 
|    for (int i = 0; i < count; ++i) {
 | 
| -    if (formats[i].depth == depth) {
 | 
| -      bits_per_pixel = formats[i].bits_per_pixel;
 | 
| -      break;
 | 
| -    }
 | 
| +    if (formats[i].depth == depth)
 | 
| +      return formats[i].bits_per_pixel;
 | 
|    }
 | 
|  
 | 
| -  XFree(formats);
 | 
| -  return bits_per_pixel;
 | 
| +  return -1;
 | 
|  }
 | 
|  
 | 
|  void PutARGBImage(XDisplay* display,
 | 
| 
 |