aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/wlr_layer_shell.c2
-rw-r--r--types/wlr_xdg_shell.c2
-rw-r--r--xwayland/selection/incoming.c1
3 files changed, 3 insertions, 2 deletions
diff --git a/types/wlr_layer_shell.c b/types/wlr_layer_shell.c
index 676ed06d..fd7bc659 100644
--- a/types/wlr_layer_shell.c
+++ b/types/wlr_layer_shell.c
@@ -340,7 +340,7 @@ static void layer_shell_handle_get_layer_surface(struct wl_client *wl_client,
surface->layer = layer;
if (layer > ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY) {
free(surface);
- wl_resource_post_error(surface->resource,
+ wl_resource_post_error(client_resource,
ZWLR_LAYER_SHELL_V1_ERROR_INVALID_LAYER,
"Invalid layer %d", layer);
return;
diff --git a/types/wlr_xdg_shell.c b/types/wlr_xdg_shell.c
index fce2a1bb..5fd3d33e 100644
--- a/types/wlr_xdg_shell.c
+++ b/types/wlr_xdg_shell.c
@@ -399,7 +399,7 @@ static const struct xdg_positioner_interface
static void xdg_shell_handle_create_positioner(struct wl_client *wl_client,
struct wl_resource *resource, uint32_t id) {
struct wlr_xdg_positioner *positioner =
- calloc(1, sizeof(struct wlr_xdg_positioner_resource));
+ calloc(1, sizeof(struct wlr_xdg_positioner));
if (positioner == NULL) {
wl_client_post_no_memory(wl_client);
return;
diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c
index 1b596254..5deb2286 100644
--- a/xwayland/selection/incoming.c
+++ b/xwayland/selection/incoming.c
@@ -309,6 +309,7 @@ static bool source_get_targets(struct wlr_xwm_selection *selection,
char **mime_type_ptr =
wl_array_add(mime_types, sizeof(*mime_type_ptr));
if (mime_type_ptr == NULL) {
+ free(mime_type);
break;
}
*mime_type_ptr = mime_type;