XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
parent
3bc608a361
commit
77df653ae3
|
@ -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…
Reference in New Issue