From 3cab1ecc49bfddc8a156447a35a498cc0a61bba8 Mon Sep 17 00:00:00 2001 From: yury Date: Thu, 23 Oct 2008 11:16:39 +0000 Subject: [PATCH] b=17447 r=adilger,deen - fixes memory leaks. --- lustre/osc/osc_request.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 284e2bb..f4e475f 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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", -- 1.8.3.1