Whamcloud - gitweb
LU-980 llog: cleanup return value in llog_client_create
authorHongchao Zhang <hongchao.zhang@whamcloud.com>
Thu, 12 Jan 2012 13:29:00 +0000 (21:29 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 17 May 2012 23:26:04 +0000 (19:26 -0400)
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>
lustre/ptlrpc/llog_client.c

index 4305375..0a5bb91 100644 (file)
@@ -147,6 +147,7 @@ out:
         ptlrpc_req_finished(req);
         return rc;
 err_free:
+        *res = NULL;
         llog_free_handle(handle);
         goto out;
 }