diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2015-11-07 16:48:54 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2015-11-07 16:48:54 +0000 |
commit | 6c07b8ab53c2bbf0feb0afbbe98b33171c7b7872 (patch) | |
tree | 35eb85f0db40ffe6e6614d780b3de61b93edb3bc /xserver/render/picture.c | |
parent | f4e01ac5608a8dfd9a4ee2f7aa43d28cc1710d81 (diff) |
Update to xserver 1.17.4.
tested by naddy@
Diffstat (limited to 'xserver/render/picture.c')
-rw-r--r-- | xserver/render/picture.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xserver/render/picture.c b/xserver/render/picture.c index 6ff31ba02..6e23e2bbf 100644 --- a/xserver/render/picture.c +++ b/xserver/render/picture.c @@ -856,7 +856,11 @@ createSourcePicture(void) { PicturePtr pPicture; - pPicture = dixAllocateScreenObjectWithPrivates(NULL, PictureRec, PRIVATE_PICTURE); + pPicture = dixAllocateScreenObjectWithPrivates(NULL, PictureRec, + PRIVATE_PICTURE); + if (!pPicture) + return 0; + pPicture->pDrawable = 0; pPicture->pFormat = 0; pPicture->pNext = 0; @@ -896,7 +900,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2, { PicturePtr pPicture; - if (nStops < 2) { + if (nStops < 1) { *error = BadValue; return 0; } @@ -936,7 +940,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner, PicturePtr pPicture; PictRadialGradient *radial; - if (nStops < 2) { + if (nStops < 1) { *error = BadValue; return 0; } @@ -979,7 +983,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle, { PicturePtr pPicture; - if (nStops < 2) { + if (nStops < 1) { *error = BadValue; return 0; } @@ -1392,6 +1396,7 @@ FreePicture(void *value, XID pid) if (--pPicture->refcnt == 0) { free(pPicture->transform); + free(pPicture->filter_params); if (pPicture->pSourcePict) { if (pPicture->pSourcePict->type != SourcePictTypeSolidFill) |