aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2009-03-31 18:24:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 11:59:23 -0400
commit00fcf2cb6f6bb421851c3ba062c0a36760ea6e53 (patch)
tree741afc144a87af1aa7915d812924da7d7418611f /fs/ecryptfs
parente2801806de1c9c1d03b7d1bfcb2e01dd4d389e80 (diff)
ecryptfs: use kzfree()
Use kzfree() instead of memset() + kfree(). Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/keystore.c3
-rw-r--r--fs/ecryptfs/messaging.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index e4a6223c3145..af737bb56cb7 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -740,8 +740,7 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes,
740out_release_free_unlock: 740out_release_free_unlock:
741 crypto_free_hash(s->hash_desc.tfm); 741 crypto_free_hash(s->hash_desc.tfm);
742out_free_unlock: 742out_free_unlock:
743 memset(s->block_aligned_filename, 0, s->block_aligned_filename_size); 743 kzfree(s->block_aligned_filename);
744 kfree(s->block_aligned_filename);
745out_unlock: 744out_unlock:
746 mutex_unlock(s->tfm_mutex); 745 mutex_unlock(s->tfm_mutex);
747out: 746out:
diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c
index 96ef51489e01..295e7fa56755 100644
--- a/fs/ecryptfs/messaging.c
+++ b/fs/ecryptfs/messaging.c
@@ -291,8 +291,7 @@ int ecryptfs_exorcise_daemon(struct ecryptfs_daemon *daemon)
291 if (daemon->user_ns) 291 if (daemon->user_ns)
292 put_user_ns(daemon->user_ns); 292 put_user_ns(daemon->user_ns);
293 mutex_unlock(&daemon->mux); 293 mutex_unlock(&daemon->mux);
294 memset(daemon, 0, sizeof(*daemon)); 294 kzfree(daemon);
295 kfree(daemon);
296out: 295out:
297 return rc; 296 return rc;
298} 297}