[libvirt] [PATCH] Fix uninitialized variable in virLXCControllerSetupDevPTS

14 Nov
2012
14 Nov
'12
3:40 p.m.
From: "Daniel P. Berrange" <berrange@redhat.com> The lack of initialization of 'opts' caused a SEGV in the cleanup: path if the root->src directory did not exist Pushed under trivial rule --- src/lxc/lxc_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index a41c903..2f1e8a5 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1144,7 +1144,7 @@ virLXCControllerSetupDevPTS(virLXCControllerPtr ctrl) { virDomainFSDefPtr root = virDomainGetRootFilesystem(ctrl->def); char *mount_options = NULL; - char *opts; + char *opts = NULL; char *devpts = NULL; int ret = -1; -- 1.7.11.7
4671
Age (days ago)
4671
Last active (days ago)
0 comments
1 participants
participants (1)
-
Daniel P. Berrange