]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lua: fix crash on missing blkio
authorStéphane Graber <stgraber@ubuntu.com>
Mon, 26 Jan 2015 05:11:55 +0000 (00:11 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 26 Jan 2015 05:11:55 +0000 (00:11 -0500)
Closes: #403
Signed-off-by: Dwight Engen
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lua-lxc/lxc.lua

index 6f8583ab330a6c4cc3499ec7a7c314f2238a67c2..122a4823b29e1ac32254eff9c4da551ca71874af 100755 (executable)
@@ -275,6 +275,10 @@ function container:stat_match_get_int(item, match, column)
     local val
     local lines = self:get_cgroup_item(item)
 
+    if (lines == nil) then
+       return 0
+    end
+
     for line in lines:gmatch("[^\r\n]+") do
        if (string.find(line, match)) then
            local col