From e53c42ca0a0568579c50b2377b52777ce67a311f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 28 Sep 2017 20:33:38 +0200 Subject: [PATCH] core: pass the correct error to the caller --- src/core/dynamic-user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c index 11d9a3c..66e83a7 100644 --- a/src/core/dynamic-user.c +++ b/src/core/dynamic-user.c @@ -306,8 +306,9 @@ static int pick_uid(char **suggested_paths, const char *name, uid_t *ret_uid) { IOVEC_INIT((char[1]) { '\n' }, 1), }, 2, 0); if (l < 0) { + r = -errno; (void) unlink(lock_path); - return -errno; + return r; } (void) ftruncate(lock_fd, l); -- 2.7.4