Messages in this thread | | | Date | Thu, 24 Jul 2014 12:09:06 +0400 | Subject | Re: [PATCH] rbd: Use rbd_segment_name_free | From | Ilya Dryomov <> |
| |
On Thu, Jul 24, 2014 at 1:47 AM, Himangi Saraogi <himangi774@gmail.com> wrote: > Free memory allocated using kmem_cache_zalloc using kmem_cache_free > rather than kfree. The helper rbd_segment_name_free does the job here. > Its position is shifted above the calling function. > > The Coccinelle semantic patch that detects this change is as follows: > > // <smpl> > @@ > expression x,E,c; > @@ > > x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,...) > ... when != x = E > when != &x > ?-kfree(x) > +kmem_cache_free(c,x) > // </smpl> > > Signed-off-by: Himangi Saraogi <himangi774@gmail.com> > Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Applied.
Thanks,
Ilya
| |