Commit 00fcf2cb authored by Johannes Weiner's avatar Johannes Weiner Committed by Linus Torvalds

ecryptfs: use kzfree()

Use kzfree() instead of memset() + kfree().
Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Reviewed-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e2801806
......@@ -740,8 +740,7 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes,
out_release_free_unlock:
crypto_free_hash(s->hash_desc.tfm);
out_free_unlock:
memset(s->block_aligned_filename, 0, s->block_aligned_filename_size);
kfree(s->block_aligned_filename);
kzfree(s->block_aligned_filename);
out_unlock:
mutex_unlock(s->tfm_mutex);
out:
......
......@@ -291,8 +291,7 @@ int ecryptfs_exorcise_daemon(struct ecryptfs_daemon *daemon)
if (daemon->user_ns)
put_user_ns(daemon->user_ns);
mutex_unlock(&daemon->mux);
memset(daemon, 0, sizeof(*daemon));
kfree(daemon);
kzfree(daemon);
out:
return rc;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment