Merge branch 'bugfix/mem-leaks-on-err-paths' into 'master'

render: fix multiple memory leaks on error paths

See merge request xorg/xserver!2125
This commit is contained in:
Mikhail 2026-02-06 11:44:12 +00:00
commit a8933a4bbe

View file

@ -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;
}