aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-06-20 00:26:47 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-06-22 11:30:47 +0200
commitf55402572cc659888be7ace585bea8c8fcb7db32 (patch)
tree667d4dd30657d304aaad92afdacd8845b4ccce24 /nx-X11/programs/Xserver/dix
parent6f954bb7d6fe3e80cce70121b18f09f39f0a1ce8 (diff)
downloadnx-libs-f55402572cc659888be7ace585bea8c8fcb7db32.tar.gz
nx-libs-f55402572cc659888be7ace585bea8c8fcb7db32.tar.bz2
nx-libs-f55402572cc659888be7ace585bea8c8fcb7db32.zip
dix/dispatch: fix a small memory leak
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index 6b6dbcad9..d656da748 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -4150,7 +4150,10 @@ AddScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
pScreen->devPrivates = (DevUnion *)calloc(sizeof(DevUnion),
screenPrivateCount);
if (!pScreen->devPrivates && screenPrivateCount)
+ {
+ free(pScreen);
return -1;
+ }
ret = init_screen(pScreen, i);
if (ret != 0) {