提交 e12b8000 编写于 作者: J Ján Tomko

Set errno on OOM in lxcProcReadMeminfo

It sets the errno on all other errors, do it here too.
Also report an error.
上级 92a8e72f
...@@ -208,8 +208,10 @@ static int lxcProcReadMeminfo(char *hostpath, virDomainDefPtr def, ...@@ -208,8 +208,10 @@ static int lxcProcReadMeminfo(char *hostpath, virDomainDefPtr def,
virBufferAdd(new_meminfo, line, -1); virBufferAdd(new_meminfo, line, -1);
} }
if (virBufferError(new_meminfo)) if (virBufferCheckError(new_meminfo) < 0) {
res = -errno;
goto cleanup; goto cleanup;
}
copied += strlen(line); copied += strlen(line);
if (copied > size) if (copied > size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册