]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/utmp.c: Don't check for NULL before free(3)
authorAlejandro Colomar <alx@kernel.org>
Sun, 29 Oct 2023 18:46:02 +0000 (19:46 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 30 Oct 2023 02:12:02 +0000 (21:12 -0500)
commit5c86700fd7b5525406cdcc5d1b16ca4cf8874acd
tree1dd4869753bd1d11dfc163d06d491cf7368c6910
parentb11129827a7e3e21e040974f0bd31b04d05e23f3
lib/utmp.c: Don't check for NULL before free(3)

free(NULL) is valid; there's no need to check for NULL.  Simplify.

Fixes: 5178f8c5afb6 ("utmp: call prepare_utmp() even if utent is NULL")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/utmp.c