Skip to content

Commit

Permalink
Staging: android: binder: Add binder buffers to kmemleak
Browse files Browse the repository at this point in the history
  • Loading branch information
neobuddy89 committed Apr 7, 2013
1 parent d75838a commit b2c3371
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/staging/android/binder.c
Expand Up @@ -815,6 +815,9 @@ static struct binder_buffer *binder_alloc_buf(struct binder_proc *proc,
proc->free_async_space);
}

kmemleak_alloc(buffer, sizeof(*buffer), 0,
GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);

return buffer;
}

Expand Down Expand Up @@ -879,6 +882,8 @@ static void binder_free_buf(struct binder_proc *proc,
struct binder_buffer *buffer)
{
size_t size, buffer_size;

kmemleak_free(buffer);

buffer_size = binder_buffer_size(proc, buffer);

Expand Down

0 comments on commit b2c3371

Please sign in to comment.