]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/utmp.c: get_current_utmp(): Don't exit(3) from library code
authorAlejandro Colomar <alx@kernel.org>
Wed, 16 Jul 2025 15:41:33 +0000 (17:41 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Tue, 17 Feb 2026 09:45:39 +0000 (10:45 +0100)
commit4b3f657aa3e16b34b7a04a39999745dbd4c98863
treedebabb33d53569685b8073a78a331bd935294941
parent6c38c7f1fa142f6b2eab0a193be0013b1a189501
lib/utmp.c: get_current_utmp(): Don't exit(3) from library code

This function already returned NULL on some errors.  It didn't make any
sense to exit(3) on allocation failure.  Instead, just return NULL.

Reviewed-by: "Evgeny Grin (Karlson2k)" <k2k@drgrin.dev>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/utmp.c