提交 12b289cf 编写于 作者: C Chengguang Xu 提交者: Anna Schumaker

nfs: add error check in nfs_idmap_prepare_message()

Even though the caller of nfs_idmap_prepare_message() checks return
code in their side but it's better to add an error check for match_int()
so that we can avoid unnecessary operations when bad int arg is
detected.
Signed-off-by: NChengguang Xu <cgxu519@gmx.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
上级 a61246c9
......@@ -516,6 +516,8 @@ static int nfs_idmap_prepare_message(char *desc, struct idmap *idmap,
case Opt_find_group:
im->im_conv = IDMAP_CONV_IDTONAME;
ret = match_int(&substr, &im->im_id);
if (ret)
goto out;
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册