]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/utmp.c: Add ATTR_MALLOC(free) attribute
authorEvgeny Grin (Karlson2k) <k2k@drgrin.dev>
Sun, 10 Aug 2025 13:31:01 +0000 (15:31 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Mon, 11 Aug 2025 08:18:19 +0000 (10:18 +0200)
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
lib/utmp.c

index 4acf95a7f8c23dce9f9265e813322502e6cc5c34..931c876e66dbd63a8e15a494523e3e60b70a6bab 100644 (file)
@@ -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)
 {