提交 21ec6ffa 编写于 作者: A Alan Cox 提交者: Sage Weil

ceph: fix potential double free

We re-run the loop but we don't re-set the attrs pointer back to NULL.
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Reviewed-by: NAlex Elder <elder@inktank.com>
上级 85effe18
......@@ -457,6 +457,7 @@ static int __build_xattrs(struct inode *inode)
for (i = 0; i < numattr; i++)
kfree(xattrs[i]);
kfree(xattrs);
xattrs = NULL;
goto start;
}
err = -EIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册