提交 2e593ba5 编写于 作者: E Eric Blake

lxc: fix logic bug

Detected by Coverity.  We want to increment the size_t counter,
not the pointer to the counter.  Bug present since 5f5c6fde (0.9.5).

* src/lxc/lxc_controller.c (lxcSetupLoopDevices): Use correct
precedence.
上级 d5c4067d
......@@ -210,7 +210,7 @@ static int lxcSetupLoopDevices(virDomainDefPtr def, size_t *nloopDevs, int **loo
virReportOOMError();
goto cleanup;
}
(*loopDevs)[*nloopDevs++] = fd;
(*loopDevs)[(*nloopDevs)++] = fd;
}
VIR_DEBUG("Setup all loop devices");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册