mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey/kms.c: Use correct variable in warnx()
The variable filename was freed inside the loop and then incorrectly
used in the subsequent warnx() call. Replacing it with directory
reflects the indented context and avoids use after free.
Fixes: f25aaf32b8 ("zkey: Add support for key management system plugins")
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Polensky <japo@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
103c9444c9
commit
549c7ef9e7
@@ -745,7 +745,7 @@ static int remove_directory_recursively(const char *directory)
|
||||
|
||||
if (rmdir(directory) != 0) {
|
||||
rc = -errno;
|
||||
warnx("Failed to remove '%s': %s", filename, strerror(-rc));
|
||||
warnx("Failed to remove '%s': %s", directory, strerror(-rc));
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user