Re: [PATCH] relay: fix potential memory leak

2016-06-01 Thread Andrew Morton
On Thu, 2 Jun 2016 09:24:04 +0800 (GMT+08:00) "Zhouyi Zhou" wrote: > Thanks Andrew for reviewing > > > In addition, give warning to users who forget to provide create file > > > hook. > > > > Why? What's the value in this? > > > > If the user didn't provide ->create_buf_file then setup_

Re: Re: [PATCH] relay: fix potential memory leak

2016-06-01 Thread Zhouyi Zhou
Thanks Andrew for reviewing > > In addition, give warning to users who forget to provide create file > > hook. > > Why? What's the value in this? > > If the user didn't provide ->create_buf_file then setup_callbacks() > will provide them with create_buf_file_default_callback() - what's >

Re: [PATCH] relay: fix potential memory leak

2016-06-01 Thread Andrew Morton
On Wed, 1 Jun 2016 18:45:27 +0800 Zhouyi Zhou wrote: > when relay_open_buf fails in relay_open, program will goto free_bufs, > but chan is nowhere freed. OK. > In addition, give warning to users who forget to provide create file > hook. Why? What's the value in this? If the user d

[PATCH] relay: fix potential memory leak

2016-06-01 Thread Zhouyi Zhou
when relay_open_buf fails in relay_open, program will goto free_bufs, but chan is nowhere freed. In addition, give warning to users who forget to provide create file hook. Signed-off-by: Zhouyi Zhou --- kernel/relay.c | 8 1 file changed, 8 insertions(+) diff --git a/kernel/relay.