aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/rrcrtc.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 11:04:10 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 11:04:10 +0100
commit20029dbc8f7d03211ceaf00001418fb75b9df644 (patch)
treee8950e052bb5ee4328a052a9cf04efc847c47eff /nx-X11/programs/Xserver/randr/rrcrtc.c
parent9d41e84ea9baf215c6de11224dc2597cd37359dc (diff)
parent3e315cd17a519dbcafff18d4294a6f7bb8070767 (diff)
downloadnx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.tar.gz
nx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.tar.bz2
nx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.zip
Merge branch 'uli42-pr/happyvalgrind' into 3.6.x
Fixes ArcticaProject/nx-libs#325. Fixes ArcticaProject/nx-libs#326. Attribute GH PR #360: https://github.com/ArcticaProject/nx-libs/pull/360
Diffstat (limited to 'nx-X11/programs/Xserver/randr/rrcrtc.c')
-rw-r--r--nx-X11/programs/Xserver/randr/rrcrtc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrcrtc.c b/nx-X11/programs/Xserver/randr/rrcrtc.c
index 59a3f446a..1034eac5d 100644
--- a/nx-X11/programs/Xserver/randr/rrcrtc.c
+++ b/nx-X11/programs/Xserver/randr/rrcrtc.c
@@ -1018,6 +1018,7 @@ ProcRRGetCrtcInfo(ClientPtr client)
mode = crtc->mode;
+ memset(&rep, 0, sizeof(xRRGetCrtcInfoReply));
rep = (xRRGetCrtcInfoReply) {
.type = X_Reply,
.status = RRSetConfigSuccess,
@@ -1055,7 +1056,7 @@ ProcRRGetCrtcInfo(ClientPtr client)
extraLen = rep.length << 2;
if (extraLen) {
- extra = malloc(extraLen);
+ extra = calloc(1, extraLen);
if (!extra)
return BadAlloc;
}
@@ -1313,6 +1314,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
sendReply:
free(outputs);
+ memset(&rep, 0, sizeof(xRRSetCrtcConfigReply));
rep = (xRRSetCrtcConfigReply) {
.type = X_Reply,
.status = status,
@@ -1354,6 +1356,7 @@ ProcRRGetPanning(ClientPtr client)
if (!pScrPriv)
return RRErrorBase + BadRRCrtc;
+ memset(&rep, 0, sizeof(xRRGetPanningReply));
rep = (xRRGetPanningReply) {
.type = X_Reply,
.status = RRSetConfigSuccess,
@@ -1453,6 +1456,7 @@ ProcRRSetPanning(ClientPtr client)
status = RRSetConfigSuccess;
sendReply:
+ memset(&rep, 0, sizeof(xRRSetPanningReply));
rep = (xRRSetPanningReply) {
.type = X_Reply,
.status = status,
@@ -1517,7 +1521,7 @@ ProcRRGetCrtcGamma(ClientPtr client)
len = crtc->gammaSize * 3 * 2;
if (crtc->gammaSize) {
- extra = malloc(len);
+ extra = calloc(1, len);
if (!extra)
return BadAlloc;
}