diff options
author | marha <marha@users.sourceforge.net> | 2010-01-24 12:50:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-01-24 12:50:27 +0000 |
commit | 7ee8516a0f5ccb3d6adaa094de9180b5a17fc50c (patch) | |
tree | 767334e17c06c81b0cfda37770f7c236d84495e3 /xorg-server | |
parent | 974379a8cbc18be08eec987bfcf09dc132d31223 (diff) | |
download | vcxsrv-7ee8516a0f5ccb3d6adaa094de9180b5a17fc50c.tar.gz vcxsrv-7ee8516a0f5ccb3d6adaa094de9180b5a17fc50c.tar.bz2 vcxsrv-7ee8516a0f5ccb3d6adaa094de9180b5a17fc50c.zip |
Solved a possible crash in closing down the screen due to use on an uninitialised pointer.
Diffstat (limited to 'xorg-server')
-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 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); |