Re: [PATCH 1/7] blktrace: fix possible memory leak
From: Arnaldo Carvalho de Melo
Date: Fri Mar 20 2009 - 08:53:46 EST
Em Fri, Mar 20, 2009 at 09:47:30AM +0800, Li Zefan escreveu:
> When we failed to create "block" debugfs dir, we should do come cleanups.
>
> Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx>
> ---
> kernel/trace/blktrace.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index b171778..fb3bc53 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -432,7 +432,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
> if (!blk_tree_root) {
> blk_tree_root = debugfs_create_dir("block", NULL);
> if (!blk_tree_root)
> - return -ENOMEM;
> + goto err;
> }
>
> dir = debugfs_create_dir(buts->name, blk_tree_root);
Nice catch,
Acked-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/