Set errno on OOM in lxcProcReadMeminfo

It sets the errno on all other errors, do it here too.
Also report an error.
This commit is contained in:
Ján Tomko 2014-06-27 10:47:05 +02:00
parent 92a8e72f9d
commit e12b8000c8

View File

@ -208,8 +208,10 @@ static int lxcProcReadMeminfo(char *hostpath, virDomainDefPtr def,
virBufferAdd(new_meminfo, line, -1);
}
if (virBufferError(new_meminfo))
if (virBufferCheckError(new_meminfo) < 0) {
res = -errno;
goto cleanup;
}
copied += strlen(line);
if (copied > size)