Permalink
Browse files

LU-980 llog: cleanup return value in llog_client_create

in llog_client_create, the newly allocated llog_handle is
return by parameter res, but it doesn't be cleaned up
if the following operations failed and the corresponding
llog_handle is already freed.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: Ib8c40c53b071fff7de3550a39f009915cb8511a7
Reviewed-on: http://review.whamcloud.com/2806
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
  • Loading branch information...
1 parent 0d8fe29 commit c7e180e3e990f8c3f1ed49e05f88659066d413f5 Hongchao Zhang committed with morrone Jan 12, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lustre/ptlrpc/llog_client.c
@@ -147,6 +147,7 @@ static int llog_client_create(struct llog_ctxt *ctxt, struct llog_handle **res,
ptlrpc_req_finished(req);
return rc;
err_free:
+ *res = NULL;
llog_free_handle(handle);
goto out;
}

0 comments on commit c7e180e

Please sign in to comment.