From 425c0e0894fb132296f3e9a8183ab3c7c62212ed Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 13 May 2005 10:09:47 +0000 Subject: [PATCH] fixes possible memory leak on error case path --- lustre/llite/llite_lib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index deb06cf..fcf0c64 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -289,6 +289,11 @@ int lustre_common_fill_super(struct super_block *sb, char *lmv, char *lov, ptlrpc_req_finished(request); if (root == NULL || is_bad_inode(root)) { + if (md.lsm != NULL) + obd_free_memmd(sbi->ll_dt_exp, &md.lsm); + if (md.mea != NULL) + obd_free_memmd(sbi->ll_md_exp, + (struct lov_stripe_md**)&md.mea); CERROR("lustre_lite: bad iget4 for root\n"); GOTO(out_root, err = -EBADF); } -- 1.8.3.1