summaryrefslogtreecommitdiff
path: root/src/cryptsetup
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-01-21 20:01:38 +0100
committerLennart Poettering <lennart@poettering.net>2019-01-23 23:37:17 +0100
commitd135419e3276c71824bfa97a60826cd9cd367797 (patch)
tree5d8657c3a4371714e1b43e1c42aaa403a77a47a8 /src/cryptsetup
parent8499b2c26dc6811495e46c8c8a69d4d2656873ac (diff)
downloadsystemd-d135419e3276c71824bfa97a60826cd9cd367797.tar.gz
cryptsetup: use free_and_replace() where appropriate
Diffstat (limited to 'src/cryptsetup')
-rw-r--r--src/cryptsetup/cryptsetup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index daf26aad70..49a7307809 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -408,8 +408,7 @@ static int get_password(const char *vol, const char *src, usec_t until, bool acc
return log_oom();
strncpy(c, *p, arg_key_size);
- free(*p);
- *p = c;
+ free_and_replace(*p, c);
}
*ret = TAKE_PTR(passwords);