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;
|
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);
|
X11ApplicationSetWindowMenu(nitems, items, shortcuts);
|
||||||
free(items);
|
free(items);
|
||||||
free(shortcuts);
|
free(shortcuts);
|
||||||
|
|
Loading…
Reference in New Issue