diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-01-21 20:01:38 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-01-23 23:37:17 +0100 |
commit | d135419e3276c71824bfa97a60826cd9cd367797 (patch) | |
tree | 5d8657c3a4371714e1b43e1c42aaa403a77a47a8 /src/cryptsetup | |
parent | 8499b2c26dc6811495e46c8c8a69d4d2656873ac (diff) | |
download | systemd-d135419e3276c71824bfa97a60826cd9cd367797.tar.gz |
cryptsetup: use free_and_replace() where appropriate
Diffstat (limited to 'src/cryptsetup')
-rw-r--r-- | src/cryptsetup/cryptsetup.c | 3 |
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); |