diff --git a/render/picture.c b/render/picture.c index 464955721c..594f02b07c 100644 --- a/render/picture.c +++ b/render/picture.c @@ -902,6 +902,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; } @@ -947,6 +948,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; } @@ -985,6 +987,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; }