diff options
author | Julia Lawall <julia@diku.dk> | 2010-03-22 16:11:55 +0800 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-05-11 17:24:59 +0200 |
commit | 077de1ad5ad8b4e08fd8853ae7e4cc628c1a369b (patch) | |
tree | ddb1add4424010444d98d497b3a801627722e42e /lib/percpu_counter.c | |
parent | 07871c195a5ec7d59d34994c123472b113da09ba (diff) | |
download | op-kernel-dev-077de1ad5ad8b4e08fd8853ae7e4cc628c1a369b.zip op-kernel-dev-077de1ad5ad8b4e08fd8853ae7e4cc628c1a369b.tar.gz |
[ARM] pxa: avoid NULL dereferencing in error handling of ssp.c
The assignments of res to the results of the two calls to
platform_get_resource make it impossible to use res in the error handling
code in the arguments to release_mem_region.
The semantic match that finds the former problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
expression E, E1;
identifier f;
statement S1,S3;
iterator iter;
@@
if ((E == NULL && ...) || ...)
{
... when != false ((E == NULL && ...) || ...)
when != true ((E != NULL && ...) || ...)
when != iter(E,...) S1
when != E = E1
(
sizeof(E->f)
|
* E->f
)
... when any
return ...;
}
else S3
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'lib/percpu_counter.c')
0 files changed, 0 insertions, 0 deletions