diff --git a/render/picture.c b/render/picture.c index 1126eb97e..eb6813c85 100644 --- a/render/picture.c +++ b/render/picture.c @@ -914,6 +914,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; } @@ -959,6 +960,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; } @@ -997,6 +999,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { + free(pPicture->pSourcePict); free(pPicture); return 0; }