aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xvmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/xvmain.c')
-rw-r--r--xorg-server/Xext/xvmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c
index 05a68907a..3c2454b01 100644
--- a/xorg-server/Xext/xvmain.c
+++ b/xorg-server/Xext/xvmain.c
@@ -277,7 +277,7 @@ XvScreenInit(ScreenPtr pScreen)
/* ALLOCATE SCREEN PRIVATE RECORD */
- pxvs = xalloc (sizeof (XvScreenRec));
+ pxvs = xcalloc (1,sizeof (XvScreenRec));
if (!pxvs)
{
ErrorF("XvScreenInit: Unable to allocate screen private structure\n");
@@ -312,7 +312,7 @@ XvCloseScreen(
pScreen->DestroyWindow = pxvs->DestroyWindow;
pScreen->CloseScreen = pxvs->CloseScreen;
- (* pxvs->ddCloseScreen)(ii, pScreen);
+ if (pxvs->ddCloseScreen) (* pxvs->ddCloseScreen)(ii, pScreen);
xfree(pxvs);