From: Evgeny Grin (Karlson2k) Date: Sun, 10 Aug 2025 13:31:01 +0000 (+0200) Subject: lib/utmp.c: Add ATTR_MALLOC(free) attribute X-Git-Tag: 4.19.0-rc1~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6053cdd14db1cbe62957bd134111820dc105e5f;p=thirdparty%2Fshadow.git lib/utmp.c: Add ATTR_MALLOC(free) attribute Signed-off-by: Evgeny Grin (Karlson2k) --- diff --git a/lib/utmp.c b/lib/utmp.c index 4acf95a7f..931c876e6 100644 --- a/lib/utmp.c +++ b/lib/utmp.c @@ -26,6 +26,7 @@ #include "alloc/x/xcalloc.h" #include "alloc/x/xmalloc.h" +#include "attr.h" #include "sizeof.h" #include "string/strchr/strnul.h" #include "string/strcmp/streq.h" @@ -146,6 +147,7 @@ err_close: * Return NULL if no entries exist in utmp for the current process or * there is an error reading utmp. */ +ATTR_MALLOC(free) static /*@null@*/ /*@only@*/struct utmpx * get_current_utmp(pid_t main_pid) {