[PATCH weston 1/3] compositor-wayland: free output before returning
U. Artie Eoff
ullysses.a.eoff at intel.com
Tue May 6 14:50:01 PDT 2014
Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
---
src/compositor-wayland.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 67f15be..35e99a6 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -1723,8 +1723,11 @@ wayland_compositor_register_output(struct wayland_compositor *c, uint32_t id)
output->id = id;
output->global = wl_registry_bind(c->parent.registry, id,
&wl_output_interface, 1);
- if (!output->global)
+ if (!output->global) {
+ free(output);
return;
+ }
+
wl_output_add_listener(output->global, &output_listener, output);
output->scale = 0;
--
1.9.0
More information about the wayland-devel
mailing list