shadow/backport-src-useradd-free-string.patch

28 lines
891 B
Diff
Raw Permalink Normal View History

From 92b889b671afb8e77cb9945a97088c6a63130067 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Mon, 11 Dec 2023 17:27:44 +0100
Subject: [PATCH] src/useradd: free string
useradd.c:2329:10: warning: Potential leak of memory pointed to by 'btrfs_check' [unix.Malloc]
Reference: https://github.com/shadow-maint/shadow/commit/92b889b671afb8e77cb9945a97088c6a63130067
Conflict: NA
---
src/useradd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/useradd.c b/src/useradd.c
index f567d54..2e8725d 100644
--- a/src/useradd.c
+++ b/src/useradd.c
@@ -2257,6 +2257,7 @@ static void create_home (void)
Prog, path);
fail_exit (E_HOMEDIR);
}
+ free(btrfs_check);
// make subvolume to mount for user instead of directory
if (btrfs_create_subvolume(path)) {
fprintf (stderr,
--
2.27.0