[PATCH weston 10/11] compositor-x11: Don't leak the looked up name for skipped outputs

Rob Bradford robert.bradford at intel.com
Fri Jul 26 08:29:44 PDT 2013


From: Rob Bradford <rob at linux.intel.com>

---
 src/compositor-x11.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 6baf522..4a73253 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1525,8 +1525,10 @@ x11_compositor_create(struct wl_display *display,
 		if (strcmp(section_name, "output") != 0)
 			continue;
 		weston_config_section_get_string(section, "name", &name, NULL);
-		if (name == NULL || name[0] != 'X')
+		if (name == NULL || name[0] != 'X') {
+			free(name);
 			continue;
+		}
 
 		weston_config_section_get_string(section,
 						 "mode", &mode, "1024x600");
-- 
1.8.3.1



More information about the wayland-devel mailing list