[client/common] fixes for issues detected through static analysis.

This commit is contained in:
Geoffrey McRae
2022-03-07 10:13:54 +11:00
parent a3820536ab
commit 3a8cb6a613
18 changed files with 228 additions and 24 deletions

View File

@@ -152,6 +152,12 @@ static void x11CBReplyFn(void * opaque, LG_ClipboardData type,
static void x11CBSelectionRequest(const XSelectionRequestEvent e)
{
XEvent * s = malloc(sizeof(*s));
if (!s)
{
DEBUG_ERROR("out of memory");
return;
}
s->xselection.type = SelectionNotify;
s->xselection.requestor = e.requestor;
s->xselection.selection = e.selection;