]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/useradd: free string
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 11 Dec 2023 16:27:44 +0000 (17:27 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 14 Dec 2023 13:40:40 +0000 (07:40 -0600)
    useradd.c:2329:10: warning: Potential leak of memory pointed to by 'btrfs_check' [unix.Malloc]

src/useradd.c

index 98603f98d55f638ef668df85be00206fe91845c0..3b20e56ff0bdadf43ca22c4e8ccd3381be030c3f 100644 (file)
@@ -2319,6 +2319,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,