aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-26 15:59:58 +0100
committeremersion <contact@emersion.fr>2018-04-26 15:59:58 +0100
commitc119c43b4838fc63273ac40ba7f29b412a62c2a4 (patch)
tree635b35ea601e969c89b4d8ea38329e7dd93f31e4 /xwayland
parent874909dca6f58e91b2db4827c9bbc7f356292123 (diff)
xwayland/selection: fix little memory leak on error
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/selection/incoming.c1
1 files changed, 1 insertions, 0 deletions
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;