It sets the errno on all other errors, do it here too.
Also report an error.
---
src/lxc/lxc_fuse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c
index ee1561c..a3a1275 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)
--
1.8.5.5