mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 18:54:02 +00:00
[client/common] fixes for issues detected through static analysis.
This commit is contained in:
@@ -57,6 +57,12 @@ void waylandWindowUpdateScale(void)
|
||||
static void wlSurfaceEnterHandler(void * data, struct wl_surface * surface, struct wl_output * output)
|
||||
{
|
||||
struct SurfaceOutput * node = malloc(sizeof(*node));
|
||||
if (!node)
|
||||
{
|
||||
DEBUG_ERROR("out of memory");
|
||||
return;
|
||||
}
|
||||
|
||||
node->output = output;
|
||||
wl_list_insert(&wlWm.surfaceOutputs, &node->link);
|
||||
waylandWindowUpdateScale();
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user