projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a46741
)
ecryptfs: ecryptfs_msg_ctx_alloc_to_free(): remove kfree() redundant null check
author
Tim Gardner
<
[email protected]
>
Tue, 12 Feb 2013 18:03:49 +0000
(11:03 -0700)
committer
Tyler Hicks
<
[email protected]
>
Tue, 12 Feb 2013 18:09:11 +0000
(10:09 -0800)
smatch analysis:
fs/ecryptfs/messaging.c:101 ecryptfs_msg_ctx_alloc_to_free() info:
redundant null check on msg_ctx->msg calling kfree()
Cc: Dustin Kirkland <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Tim Gardner <
[email protected]
>
Signed-off-by: Tyler Hicks <
[email protected]
>
fs/ecryptfs/messaging.c
patch
|
blob
|
history
diff --git
a/fs/ecryptfs/messaging.c
b/fs/ecryptfs/messaging.c
index 5fa2471796c2d9b2174a0f39fed60ef2fc562a07..d5c7297c5816104236b605cb07261981b8a88293 100644
(file)
--- a/
fs/ecryptfs/messaging.c
+++ b/
fs/ecryptfs/messaging.c
@@
-97,8
+97,7
@@
static void ecryptfs_msg_ctx_free_to_alloc(struct ecryptfs_msg_ctx *msg_ctx)
void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx)
{
list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list);
- if (msg_ctx->msg)
- kfree(msg_ctx->msg);
+ kfree(msg_ctx->msg);
msg_ctx->msg = NULL;
msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE;
}