mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-11-27 03:53:59 +08:00
src/useradd.c: De-duplicate code
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
701fe4cf1a
commit
a74c4b6ae1
@ -571,14 +571,13 @@ static int set_defaults (void)
|
||||
}
|
||||
|
||||
ret = mkdir(dirname(new_file_dup), 0755);
|
||||
free(new_file_dup);
|
||||
if (-1 == ret && EEXIST != errno) {
|
||||
fprintf (stderr,
|
||||
_("%s: cannot create directory for defaults file\n"),
|
||||
Prog);
|
||||
free(new_file_dup);
|
||||
goto err_free_def;
|
||||
}
|
||||
free(new_file_dup);
|
||||
|
||||
/*
|
||||
* Create a temporary file to copy the new output to.
|
||||
|
Loading…
Reference in New Issue
Block a user