aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-08-06 22:58:49 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-13 13:50:36 -0700
commit0dd272ef0b3f6023712e80cb56626b3020ab8d87 (patch)
tree7950dfaef19d19740e85d15330f3b275e359791d /scripts/patch-kernel
parent1fef595f75ceb07fe1334d918feff6f788c2d8ba (diff)
fs/ecryptfs/file.c: introduce missing free
commit ceeab92971e8af05c1e81a4ff2c271124b55bb9b upstream. The comments in the code indicate that file_info should be released if the function fails. This releasing is done at the label out_free, not out. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = kmem_cache_zalloc(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return <+...x...+>; | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmem_cache_zalloc %s" % (p1[0].file,p1[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions