aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc/paths.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/paths.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mds-kbdc/paths.c b/src/mds-kbdc/paths.c
index a14681e..e294020 100644
--- a/src/mds-kbdc/paths.c
+++ b/src/mds-kbdc/paths.c
@@ -73,7 +73,10 @@ char* abspath(const char* path)
size_t size, p;
if (*path == '/')
- return strdup(path);
+ {
+ fail_if (buf = strdup(path), buf == NULL);
+ return buf;
+ }
fail_if (cwd = curpath(), cwd == NULL);
size = (p = strlen(cwd)) + strlen(path) + 2;