diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-03-03 11:04:10 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-03-03 11:04:10 +0100 |
commit | 20029dbc8f7d03211ceaf00001418fb75b9df644 (patch) | |
tree | e8950e052bb5ee4328a052a9cf04efc847c47eff /nx-X11/programs/Xserver/dix/property.c | |
parent | 9d41e84ea9baf215c6de11224dc2597cd37359dc (diff) | |
parent | 3e315cd17a519dbcafff18d4294a6f7bb8070767 (diff) | |
download | nx-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/dix/property.c')
-rw-r--r-- | nx-X11/programs/Xserver/dix/property.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/dix/property.c b/nx-X11/programs/Xserver/dix/property.c index f5713cf5e..211c4cce2 100644 --- a/nx-X11/programs/Xserver/dix/property.c +++ b/nx-X11/programs/Xserver/dix/property.c @@ -101,7 +101,6 @@ ProcRotateProperties(ClientPtr client) register Atom * atoms; PropertyPtr * props; /* array of pointer */ PropertyPtr pProp; - xEvent event; REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2); UpdateCurrentTime(); @@ -169,7 +168,9 @@ found: { /* Generate a PropertyNotify event for each property whose value is changed in the order in which they appear in the request. */ + xEvent event; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = PropertyNotify; event.u.property.window = pWin->drawable.id; event.u.property.state = PropertyNewValue; @@ -259,7 +260,6 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, Bool sendevent) { PropertyPtr pProp; - xEvent event; int sizeInBytes; int totalSize; void * data; @@ -356,6 +356,8 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, } if (sendevent) { + xEvent event; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = PropertyNotify; event.u.property.window = pWin->drawable.id; event.u.property.state = PropertyNewValue; @@ -371,7 +373,6 @@ int DeleteProperty(WindowPtr pWin, Atom propName) { PropertyPtr pProp, prevProp; - xEvent event; if (!(pProp = wUserProps (pWin))) return(Success); @@ -385,6 +386,7 @@ DeleteProperty(WindowPtr pWin, Atom propName) } if (pProp) { + xEvent event; if (prevProp == (PropertyPtr)NULL) /* takes care of head */ { if (!(pWin->optional->userProps = pProp->next)) @@ -394,6 +396,7 @@ DeleteProperty(WindowPtr pWin, Atom propName) { prevProp->next = pProp->next; } + memset(&event, 0, sizeof(xEvent)); event.u.u.type = PropertyNotify; event.u.property.window = pWin->drawable.id; event.u.property.state = PropertyDelete; @@ -412,6 +415,7 @@ DeleteAllWindowProperties(WindowPtr pWin) PropertyPtr pProp, pNextProp; xEvent event; + memset(&event, 0, sizeof(xEvent)); pProp = wUserProps (pWin); while (pProp) { @@ -566,6 +570,7 @@ ProcGetProperty(ClientPtr client) { /* send the event */ xEvent event; + memset(&event, 0, sizeof(xEvent)); event.u.u.type = PropertyNotify; event.u.property.window = pWin->drawable.id; event.u.property.state = PropertyDelete; @@ -628,6 +633,7 @@ ProcListProperties(ClientPtr client) if(!(pAtoms = (Atom *)ALLOCATE_LOCAL(numProps * sizeof(Atom)))) return(BadAlloc); + memset(&xlpr, 0, sizeof(xListPropertiesReply)); xlpr.type = X_Reply; xlpr.nProperties = numProps; xlpr.length = (numProps * sizeof(Atom)) >> 2; |