aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorJulia Lawall <[email protected]>2010-08-11 10:11:41 +0000
committerTyler Hicks <[email protected]>2010-08-27 15:50:52 +0000
commitf137f15072411618e37b338aa13e5ae43583bcf2 (patch)
treea1679017c58f65b7fd20febab16bb338354bd59b /net/unix/af_unix.c
parentLinux 2.6.36-rc2 (diff)
downloadkernel-f137f15072411618e37b338aa13e5ae43583bcf2.tar.gz
kernel-f137f15072411618e37b338aa13e5ae43583bcf2.zip
fs/ecryptfs: Return -ENOMEM on memory allocation failure
In this code, 0 is returned on memory allocation failure, even though other failures return -ENOMEM or other similar values. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression ret; expression x,e1,e2,e3; @@ ret = 0 ... when != ret = e1 *x = \(kmalloc\|kcalloc\|kzalloc\)(...) ... when != ret = e2 if (x == NULL) { ... when != ret = e3 return ret; } // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Tyler Hicks <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions