From: tappro Date: Mon, 25 Sep 2006 12:03:38 +0000 (+0000) Subject: - remove pointer med_mcd on the freed mcd to avoid double free in client_del() X-Git-Tag: v1_8_0_110~486^2~837 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=fa2aec8d24874e94695e05d8c67ef22ba777cd96;p=fs%2Flustre-release.git - remove pointer med_mcd on the freed mcd to avoid double free in client_del() --- diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index b269625..f246dfe 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -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; }