aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/os_unix.c')
-rw-r--r--src/utils/os_unix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c
index cc22e83..40ad9d4 100644
--- a/src/utils/os_unix.c
+++ b/src/utils/os_unix.c
@@ -213,6 +213,9 @@ char * os_rel2abs_path(const char *rel_path)
size_t len = 128, cwd_len, rel_len, ret_len;
int last_errno;
+ if (!rel_path)
+ return NULL;
+
if (rel_path[0] == '/')
return os_strdup(rel_path);