aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-06-30 11:17:30 +0900
committerDominique Martinet <asmadeus@codewreck.org>2018-06-30 11:47:25 +0900
commit1fef1f88b2c28777d559f7240aafe0dc078cf9e5 (patch)
tree02285f815bf994a1d4cc72d21651d57d9c1e18fd
parente5348ad7d374713d4e1a386849b15fb0d68de31c (diff)
export dmabuf manager_handle_capture_output: fix leak on error
Found through static analysis
-rw-r--r--types/wlr_export_dmabuf_v1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/types/wlr_export_dmabuf_v1.c b/types/wlr_export_dmabuf_v1.c
index 68adda02..e68b0fef 100644
--- a/types/wlr_export_dmabuf_v1.c
+++ b/types/wlr_export_dmabuf_v1.c
@@ -84,6 +84,7 @@ static void manager_handle_capture_output(struct wl_client *client,
&zwlr_export_dmabuf_frame_v1_interface, version, id);
if (frame->resource == NULL) {
wl_client_post_no_memory(client);
+ free(frame);
return;
}
wl_resource_set_implementation(frame->resource, &frame_impl, frame,