From: Lennart Poettering Date: Thu, 28 Sep 2017 18:33:38 +0000 (+0200) Subject: core: pass the correct error to the caller X-Git-Tag: v235~36^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e53c42ca0a0568579c50b2377b52777ce67a311f;p=thirdparty%2Fsystemd.git core: pass the correct error to the caller --- diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c index 11d9a3ce376..66e83a74b6b 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);