diff options
author | Julia Lawall <julia@diku.dk> | 2011-10-28 19:58:16 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-07 13:12:24 -0200 |
commit | 0a4524d726cd4d109c57fc194a55ff0a9e4df0e9 (patch) | |
tree | 5eca26e273476851caf0ed9a9a2706783ff964da /drivers/media/video/atmel-isi.c | |
parent | 0d37d35035cb41f01e12082fa6b39a2e465ca4ba (diff) |
[media] drivers/media/video/atmel-isi.c: eliminate a null pointer dereference
The variable isi might be null or might be freed at the point of the call
to clk_put. pclk contains the value that isi->pclk is expected to point to.
The semantic match that finds this problem is as follows:
// <smpl>
@r@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@
if (E == NULL)
{
... when != if (E == NULL || ...) S1 else S2
when != E = E1
*E->f
... when any
return ...;
}
else S3
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/atmel-isi.c')
-rw-r--r-- | drivers/media/video/atmel-isi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/atmel-isi.c b/drivers/media/video/atmel-isi.c index 8c775c59e120..fbc904f2f6fd 100644 --- a/drivers/media/video/atmel-isi.c +++ b/drivers/media/video/atmel-isi.c @@ -1036,7 +1036,7 @@ err_alloc_ctx: err_alloc_descriptors: kfree(isi); err_alloc_isi: - clk_put(isi->pclk); + clk_put(pclk); return ret; } |