aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorJulia Lawall <[email protected]>2011-07-09 21:23:26 +0200
committerGreg Kroah-Hartman <[email protected]>2011-08-02 16:12:49 -0700
commitfe3e593601752d547bd00d83f0bdedbce1d80f59 (patch)
tree153f35363ec1c74c545345398876ea7f3a75d233 /tools/perf/util/scripting-engines/trace-event-python.c
parent55dc6ee7def173f0dd3b6d0d0257917112d542e9 (diff)
drivers/staging/hv/blkvsc_drv.c: eliminate NULL pointer dereference
In this code, blkvsc_req is allocated in the cache blkdev->request_pool, but freed in the first case to the cache blkvsc_req->dev->request_pool. blkvsc_req->dev is subsequently initialized to blkdev, making these the same at the second call to kmem_cache_free. But at the point of the first call, blkvsc_req->dev is NULL. The second call is changed too, for uniformity. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,e,e1,e2,e3; @@ x = \(kmem_cache_alloc\|kmem_cache_zalloc\)(e1,e2) ... when != x = e ( kmem_cache_free(e1,x); | ?-kmem_cache_free(e3,x); +kmem_cache_free(e1,x); ) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: KY Srinivasan <[email protected]> Cc: Hank Janssen <[email protected]> Cc: Haiyang Zhang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions