compositor-wayland: don't free unallocated memory

Assigning a string constant (i.e. memory that we didn't allocate)
to a char* pointer and then freeing that pointer is bad news.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
This commit is contained in:
U. Artie Eoff 2014-01-17 12:22:50 -08:00 committed by Kristian Høgsberg
parent 107de96ba7
commit 1a08d1196a

View File

@ -879,7 +879,7 @@ wayland_output_create_for_config(struct wayland_compositor *c,
name = str;
}
if (!name)
name = WINDOW_TITLE;
name = strdup(WINDOW_TITLE);
weston_config_section_get_string(config_section,
"mode", &mode, "1024x600");