Re: [PATCH] relay: fix potential memory leak
From: Andrew Morton
Date: Wed Jun 01 2016 - 17:56:56 EST
On Wed, 1 Jun 2016 18:45:27 +0800 Zhouyi Zhou <yizhouzhou@xxxxxxxxx> 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 didn't provide ->create_buf_file then setup_callbacks()
will provide them with create_buf_file_default_callback() - what's
wrong with that?