Whamcloud - gitweb
- remove pointer med_mcd on the freed mcd to avoid double free in client_del()
authortappro <tappro>
Mon, 25 Sep 2006 12:03:38 +0000 (12:03 +0000)
committertappro <tappro>
Mon, 25 Sep 2006 12:03:38 +0000 (12:03 +0000)
lustre/mdt/mdt_handler.c

index b269625..f246dfe 100644 (file)
@@ -3480,8 +3480,10 @@ static int mdt_obd_connect(const struct lu_context *ctx,
                         memcpy(mcd->mcd_uuid, cluuid, sizeof mcd->mcd_uuid);
                         med->med_mcd = mcd;
                         rc = mdt_client_new(ctx, mdt, med);
-                        if (rc != 0)
+                        if (rc != 0) {
                                 OBD_FREE_PTR(mcd);
+                                med->med_mcd = NULL;
+                        }
                 } else
                         rc = -ENOMEM;
         }