Bug 1020439 - Call cairo_surface_destroy in GetCairoSurfaceForSourceSurface in case of failure. r=bas

This commit is contained in:
Sasha Fydrich 2014-06-22 11:10:07 -07:00
Родитель 9dd8319d1b
Коммит 514fc57d28
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -177,6 +177,7 @@ GetCairoSurfaceForSourceSurface(SourceSurface *aSurface, bool aExistingOnly = fa
// investigation hasn't been done to determine the underlying cause. We
// will just handle the failure to allocate the surface to avoid a crash.
if (cairo_surface_status(surf)) {
cairo_surface_destroy(surf);
return nullptr;
}