From caea7122456e9a0f1a159bc0ad1fcef836a03ab4 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 (cherry picked from commit 3782814d4ad787d815e56382b6f809fe9020f14b) --- 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 d407e708d1..ab7e12ab35 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1143,7 +1143,7 @@ virLXCControllerSetupDevPTS(virLXCControllerPtr ctrl) { virDomainFSDefPtr root = virDomainGetRootFilesystem(ctrl->def); char *mount_options = NULL; - char *opts; + char *opts = NULL; char *devpts = NULL; int ret = -1; -- 2.47.2