From: tianzy Date: Fri, 31 Oct 2008 07:51:41 +0000 (+0000) Subject: Branch b1_8_gate X-Git-Tag: v1_7_130~1^71 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=faa145dcaa5c5ca50ac3775631bd64aedcda0271;p=fs%2Flustre-release.git Branch b1_8_gate fix a possible NULL pointer in client_quota_ctl() b=17486 i=johann i=panda --- diff --git a/lustre/quota/quota_ctl.c b/lustre/quota/quota_ctl.c index 900f1ce..154a39f 100644 --- a/lustre/quota/quota_ctl.c +++ b/lustre/quota/quota_ctl.c @@ -289,8 +289,10 @@ int client_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl) GOTO(out, rc); } - oqc = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*oqc), - lustre_swab_obd_quotactl); + oqc = NULL; + if (req->rq_repmsg) + oqc = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*oqc), + lustre_swab_obd_quotactl); if (oqc == NULL) { CERROR ("Can't unpack obd_quotactl\n"); GOTO(out, rc = -EPROTO);