we don't need to get the weston_config object before zalloc success.
int *argc, char *argv[])
{
struct screen_share *ss;
- struct weston_config *config = wet_get_config(compositor);
+ struct weston_config *config;
struct weston_config_section *section;
ss = zalloc(sizeof *ss);
return -1;
ss->compositor = compositor;
+ config = wet_get_config(compositor);
+
section = weston_config_get_section(config, "screen-share", NULL, NULL);
weston_config_section_get_string(section, "command", &ss->command, "");