summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/screenshooter.c10
-rw-r--r--src/text-backend.c7
2 files changed, 13 insertions, 4 deletions
diff --git a/src/screenshooter.c b/src/screenshooter.c
index af2c754a..cafbf107 100644
--- a/src/screenshooter.c
+++ b/src/screenshooter.c
@@ -287,9 +287,15 @@ screenshooter_binding(struct weston_seat *seat, uint32_t time, uint32_t key,
{
struct screenshooter *shooter = data;
char *screenshooter_exe;
+ int ret;
- asprintf(&screenshooter_exe, "%s/%s", weston_config_get_libexec_dir(),
- "/weston-screenshooter");
+ ret = asprintf(&screenshooter_exe, "%s/%s",
+ weston_config_get_libexec_dir(),
+ "/weston-screenshooter");
+ if (ret < 0) {
+ weston_log("Could not construct screenshooter path.\n");
+ return;
+ }
if (!shooter->client)
shooter->client = weston_client_launch(shooter->ec,
diff --git a/src/text-backend.c b/src/text-backend.c
index 7d2a0640..e9578a41 100644
--- a/src/text-backend.c
+++ b/src/text-backend.c
@@ -938,11 +938,14 @@ text_backend_configuration(struct text_backend *text_backend)
{
struct weston_config_section *section;
char *client;
+ int ret;
section = weston_config_get_section(text_backend->compositor->config,
"input-method", NULL, NULL);
- asprintf(&client, "%s/weston-keyboard",
- weston_config_get_libexec_dir());
+ ret = asprintf(&client, "%s/weston-keyboard",
+ weston_config_get_libexec_dir());
+ if (ret < 0)
+ client = NULL;
weston_config_section_get_string(section, "path",
&text_backend->input_method.path,
client);