Whamcloud - gitweb
fixes possible memory leak on error case path
authoryury <yury>
Fri, 13 May 2005 10:09:47 +0000 (10:09 +0000)
committeryury <yury>
Fri, 13 May 2005 10:09:47 +0000 (10:09 +0000)
lustre/llite/llite_lib.c

index deb06cf..fcf0c64 100644 (file)
@@ -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);
         }