mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-21 10:00:45 +02:00
Fix property and selection devPrivate allocation.
Selection objects were not being allocated with privates, and both
objects had a stray statement that zeroed out the devPrivates field.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
Reported-by: Justin Mattock <justinmattock@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9ef6241c23)
This commit is contained in:
parent
79ee78de9d
commit
ad62b24009
2 changed files with 1 additions and 3 deletions
|
|
@ -284,7 +284,6 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
|
|||
pProp->format = format;
|
||||
pProp->data = data;
|
||||
pProp->size = len;
|
||||
pProp->devPrivates = NULL;
|
||||
rc = XaceHookPropertyAccess(pClient, pWin, &pProp,
|
||||
DixCreateAccess|DixWriteAccess);
|
||||
if (rc != Success) {
|
||||
|
|
|
|||
|
|
@ -196,12 +196,11 @@ ProcSetSelectionOwner(ClientPtr client)
|
|||
/*
|
||||
* It doesn't exist, so add it...
|
||||
*/
|
||||
pSel = malloc(sizeof(Selection));
|
||||
pSel = dixAllocateObjectWithPrivates(Selection, PRIVATE_SELECTION);
|
||||
if (!pSel)
|
||||
return BadAlloc;
|
||||
|
||||
pSel->selection = stuff->selection;
|
||||
pSel->devPrivates = NULL;
|
||||
|
||||
/* security creation/labeling check */
|
||||
rc = XaceHookSelectionAccess(client, &pSel,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue