mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-27 10:30:10 +01:00
XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 77df653ae3)
This commit is contained in:
parent
bb315485b4
commit
4ab897c033
1 changed files with 9 additions and 0 deletions
|
|
@ -398,6 +398,15 @@ ProcAppleWMSetWindowMenu(register ClientPtr client)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if we bailed out of the above loop due to a request that was too long */
|
||||
if (j < nitems) {
|
||||
free(items);
|
||||
free(shortcuts);
|
||||
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
X11ApplicationSetWindowMenu(nitems, items, shortcuts);
|
||||
free(items);
|
||||
free(shortcuts);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue