summaryrefslogtreecommitdiff
path: root/desktop-shell/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-shell/shell.c')
-rw-r--r--desktop-shell/shell.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 61033093..234849a2 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -575,6 +575,7 @@ shell_configuration(struct desktop_shell *shell)
struct weston_config_section *section;
int duration;
char *s, *client;
+ int ret;
section = weston_config_get_section(shell->compositor->config,
"screensaver", NULL, NULL);
@@ -585,8 +586,10 @@ shell_configuration(struct desktop_shell *shell)
section = weston_config_get_section(shell->compositor->config,
"shell", NULL, NULL);
- asprintf(&client, "%s/%s", weston_config_get_libexec_dir(),
- WESTON_SHELL_CLIENT);
+ ret = asprintf(&client, "%s/%s", weston_config_get_libexec_dir(),
+ WESTON_SHELL_CLIENT);
+ if (ret < 0)
+ client = NULL;
weston_config_section_get_string(section,
"client", &s, client);
free(client);