diff options
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/render/picture.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c index e35d1e9bc..01821f474 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c @@ -318,6 +318,8 @@ static PicturePtr createSourcePicture(void) sizeof(nxagentPrivPictureRec); pPicture = (PicturePtr) calloc(1, totalPictureSize); + if (!pPicture) + return 0; if (pPicture != NULL) { diff --git a/nx-X11/programs/Xserver/render/picture.c b/nx-X11/programs/Xserver/render/picture.c index eba042903..c06ac3550 100644 --- a/nx-X11/programs/Xserver/render/picture.c +++ b/nx-X11/programs/Xserver/render/picture.c @@ -979,6 +979,8 @@ static PicturePtr createSourcePicture(void) { PicturePtr pPicture; pPicture = (PicturePtr) malloc(sizeof(PictureRec)); + if (!pPicture) + return 0; pPicture->pDrawable = 0; pPicture->pFormat = 0; pPicture->pNext = 0; |