Whamcloud - gitweb
b=17447
authoryury <yury>
Thu, 23 Oct 2008 11:16:39 +0000 (11:16 +0000)
committeryury <yury>
Thu, 23 Oct 2008 11:16:39 +0000 (11:16 +0000)
r=adilger,deen

- fixes memory leaks.

lustre/osc/osc_request.c

index 284e2bb..f4e475f 100644 (file)
@@ -3704,8 +3704,13 @@ static int osc_llog_init(struct obd_device *obd, struct obd_device *tgt,
 
         rc = llog_setup(obd, LLOG_SIZE_REPL_CTXT, tgt, count, NULL,
                         &osc_size_repl_logops);
-        if (rc)
+        if (rc) {
+                struct llog_ctxt *ctxt = 
+                        llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
+                if (ctxt)
+                        llog_cleanup(ctxt);
                 CERROR("failed LLOG_SIZE_REPL_CTXT\n");
+        }
 out:
         if (rc) {
                 CERROR("osc '%s' tgt '%s' cnt %d catid %p rc=%d\n",