also break once we have found root, no need to search the rest of the mounts
Signed-off-by: Dwight Engen <dwight.en...@oracle.com> --- src/lxc/conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 125e8a6..827626f 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1067,10 +1067,11 @@ int detect_shared_rootfs(void) if (strcmp(p+1, "/") == 0) { // this is '/'. is it shared? p = index(p2+1, ' '); - if (strstr(p, "shared:")) { + if (p && strstr(p, "shared:")) { fclose(f); return 1; } + break; } } fclose(f); -- 1.8.1.4 ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel