diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-02-25 02:17:18 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2017-03-02 12:22:40 +0100 |
commit | 3e315cd17a519dbcafff18d4294a6f7bb8070767 (patch) | |
tree | e8950e052bb5ee4328a052a9cf04efc847c47eff /nx-X11/programs/Xserver/hw/nxagent/NXrender.c | |
parent | 9d41e84ea9baf215c6de11224dc2597cd37359dc (diff) | |
download | nx-libs-3e315cd17a519dbcafff18d4294a6f7bb8070767.tar.gz nx-libs-3e315cd17a519dbcafff18d4294a6f7bb8070767.tar.bz2 nx-libs-3e315cd17a519dbcafff18d4294a6f7bb8070767.zip |
Fix "uninitialised byte(s)" complaints from valgrind
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXrender.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c index 8d55516fb..36aa3323e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c @@ -229,10 +229,9 @@ ProcRenderQueryPictFormats (ClientPtr client) ndepth * sizeof (xPictDepth) + nvisual * sizeof (xPictVisual) + numSubpixel * sizeof (CARD32)); - reply = (xRenderQueryPictFormatsReply *) malloc (rlength); + reply = (xRenderQueryPictFormatsReply *) calloc (1, rlength); if (!reply) return BadAlloc; - memset(reply, 0, rlength); reply->type = X_Reply; reply->sequenceNumber = client->sequence; reply->length = (rlength - sizeof(xGenericReply)) >> 2; |