[PATCH weston] editor: Add missing free() and display_destroy() in main

Raúl Peñacoba raul.mikaop.zelda at gmail.com
Wed Mar 29 16:16:46 UTC 2017


Signed-off-by: Raúl Peñacoba <raul.mikaop.zelda at gmail.com>
---
 clients/editor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clients/editor.c b/clients/editor.c
index a0cc97af..b63c5628 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -1607,6 +1607,7 @@ main(int argc, char *argv[])
 	editor.display = display_create(&argc, argv);
 	if (editor.display == NULL) {
 		fprintf(stderr, "failed to create display: %m\n");
+		free(text_buffer);
 		return -1;
 	}
 
@@ -1615,6 +1616,8 @@ main(int argc, char *argv[])
 
 	if (editor.text_input_manager == NULL) {
 		fprintf(stderr, "No text input manager global\n");
+		display_destroy(editor.display);
+		free(text_buffer);
 		return -1;
 	}
 
-- 
2.12.1



More information about the wayland-devel mailing list