Commit ba0e1b53 authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging/lustre/mdc: fix issue found by Klocwork Insight tool

Pointer 'mod' checked for NULL at line 160 may be dereferenced at line 208.
Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/9387
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629Reviewed-by: default avatarLai Siyao <lai.siyao@intel.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f85065e5
......@@ -199,7 +199,8 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
*request = req;
if (rc && req->rq_commit_cb) {
/* Put an extra reference on \var mod on error case. */
obd_mod_put(*mod);
if (mod != NULL && *mod != NULL)
obd_mod_put(*mod);
req->rq_commit_cb(req);
}
return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment