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,6 +199,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, ...@@ -199,6 +199,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
*request = req; *request = req;
if (rc && req->rq_commit_cb) { if (rc && req->rq_commit_cb) {
/* Put an extra reference on \var mod on error case. */ /* Put an extra reference on \var mod on error case. */
if (mod != NULL && *mod != NULL)
obd_mod_put(*mod); obd_mod_put(*mod);
req->rq_commit_cb(req); req->rq_commit_cb(req);
} }
......
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