diff options
Diffstat (limited to 'xorg-server/Xext/xvmain.c')
-rw-r--r-- | xorg-server/Xext/xvmain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c index 0c5dc9bc1..6515f7e56 100644 --- a/xorg-server/Xext/xvmain.c +++ b/xorg-server/Xext/xvmain.c @@ -271,7 +271,7 @@ XvScreenInit(ScreenPtr pScreen) /* ALLOCATE SCREEN PRIVATE RECORD */ - pxvs = malloc(sizeof(XvScreenRec)); + pxvs = calloc(1,sizeof(XvScreenRec)); if (!pxvs) { ErrorF("XvScreenInit: Unable to allocate screen private structure\n"); return BadAlloc; @@ -302,7 +302,7 @@ XvCloseScreen(ScreenPtr pScreen) pScreen->DestroyWindow = pxvs->DestroyWindow; pScreen->CloseScreen = pxvs->CloseScreen; - (*pxvs->ddCloseScreen) (pScreen); + if (pxvs->ddCloseScreen) (*pxvs->ddCloseScreen) (pScreen); free(pxvs); |