From 3782814d4ad787d815e56382b6f809fe9020f14b Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 14 Nov 2012 15:39:48 +0000 Subject: [PATCH] Fix uninitialized variable in virLXCControllerSetupDevPTS The lack of initialization of 'opts' caused a SEGV in the cleanup: path if the root->src directory did not exist --- 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 a41c9037c6..2f1e8a57da 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;