diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c index ee1561cfc9..a3a1275d8e 100644 --- a/src/lxc/lxc_fuse.c +++ b/src/lxc/lxc_fuse.c @@ -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)