diff --git a/render/picture.c b/render/picture.c index 6cc3e7e4c..b2ceed55e 100644 --- a/render/picture.c +++ b/render/picture.c @@ -913,6 +913,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; } @@ -958,6 +959,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; } @@ -996,6 +998,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; }