diff options
Diffstat (limited to 'pseudo_client.c')
-rw-r--r-- | pseudo_client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pseudo_client.c b/pseudo_client.c index 421fe61..a8550ef 100644 --- a/pseudo_client.c +++ b/pseudo_client.c @@ -124,6 +124,7 @@ pseudo_pwd_lck_open(void) { return -1; } } + pseudo_pwd_lck_close(); pseudo_pwd_lck_fd = PSEUDO_ETC_FILE(".pwd.lock", pseudo_pwd_lck_name, O_RDWR | O_CREAT); return pseudo_pwd_lck_fd; @@ -750,6 +751,9 @@ base_path(int dirfd, const char *path, int leave_last) { size_t minlen = 0; char *newpath; + if (!path) + return NULL; + if (path[0] != '/') { if (dirfd != -1 && dirfd != AT_FDCWD) { if (dirfd >= 0) { |