summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2015-06-30 21:35:43 -0700
committerBryce Harrington <bryce@osg.samsung.com>2015-07-10 01:09:33 -0700
commitd3553c721c0fed07f85b70fea418ca65ed974fbb (patch)
tree3f1c316c11ef7fbe1e42bdb6c8273375d91483f3 /xwayland
parentda9d8fa3e46cc035f94be6441452a7738327ecf0 (diff)
downloadweston-d3553c721c0fed07f85b70fea418ca65ed974fbb.tar.gz
xwayland: Always free reply from xcb_get_property_reply()
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/selection.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xwayland/selection.c b/xwayland/selection.c
index 572a0b59..451b9153 100644
--- a/xwayland/selection.c
+++ b/xwayland/selection.c
@@ -119,8 +119,9 @@ weston_wm_get_incr_chunk(struct weston_wm *wm)
} else {
weston_log("transfer complete\n");
close(wm->data_source_fd);
- free(reply);
}
+
+ free(reply);
}
struct x11_data_source {
@@ -192,8 +193,10 @@ weston_wm_get_selection_targets(struct weston_wm *wm)
}
source = malloc(sizeof *source);
- if (source == NULL)
+ if (source == NULL) {
+ free(reply);
return;
+ }
wl_signal_init(&source->base.destroy_signal);
source->base.accept = data_source_accept;
@@ -237,12 +240,13 @@ weston_wm_get_selection_data(struct weston_wm *wm)
if (reply->type == wm->atom.incr) {
dump_property(wm, wm->atom.wl_selection, reply);
wm->incr = 1;
- free(reply);
} else {
dump_property(wm, wm->atom.wl_selection, reply);
wm->incr = 0;
weston_wm_write_property(wm, reply);
}
+
+ free(reply);
}
static void