diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-05 11:29:10 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-10 11:39:03 +0200 |
commit | e693a9323599ed6675ea598000362a9671214147 (patch) | |
tree | d2f67282cae654d4a7b1b3e7cc5c8b55922876cb /src/reply-password | |
parent | 44c786f04ad40d89b0a0cf4c31612b0b2a4f3765 (diff) | |
download | systemd-e693a9323599ed6675ea598000362a9671214147.tar.gz |
Use _cleanup(free_and_erasep) where appropriate
Replaces #12959.
Diffstat (limited to 'src/reply-password')
-rw-r--r-- | src/reply-password/reply-password.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/reply-password/reply-password.c b/src/reply-password/reply-password.c index f8f6c2d3ec..7fd1fc5d1d 100644 --- a/src/reply-password/reply-password.c +++ b/src/reply-password/reply-password.c @@ -35,7 +35,7 @@ static int send_on_socket(int fd, const char *socket_name, const void *packet, s } int main(int argc, char *argv[]) { - _cleanup_free_ char *packet = NULL; + _cleanup_(erase_and_freep) char *packet = NULL; _cleanup_close_ int fd = -1; size_t length = 0; int r; @@ -93,7 +93,5 @@ int main(int argc, char *argv[]) { r = send_on_socket(fd, argv[2], packet, length); finish: - explicit_bzero_safe(packet, length); - return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } |