dlm: master - dlm_controld: fix uninitialized mem for fence_all config

David Teigland teigland at fedoraproject.org
Thu Aug 16 16:33:14 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/?p=dlm.git;a=commitdiff;h=5e069a534379611e08714ac81870af6b387a4038
Commit:        5e069a534379611e08714ac81870af6b387a4038
Parent:        d38ab51fc27764ae34849229c7f447cc60de5de1
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Thu Aug 16 11:29:43 2012 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Thu Aug 16 11:31:35 2012 -0500

dlm_controld: fix uninitialized mem for fence_all config

If the fence_all config option is used, this could cause
unfencing to be used when it shouldn't, which could cause
startup to fail.

Signed-off-by: David Teigland <teigland at redhat.com>
---
 dlm_controld/fence_config.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlm_controld/fence_config.c b/dlm_controld/fence_config.c
index 66a1ad6..5d8d7dc 100644
--- a/dlm_controld/fence_config.c
+++ b/dlm_controld/fence_config.c
@@ -251,6 +251,7 @@ int fence_config_init(struct fence_config *fc, unsigned int nodeid, char *path)
 				rv = -ENOMEM;
 				goto out;
 			}
+			memset(dev, 0, sizeof(struct fence_device));
 
 			rv = sscanf(line, "%s %s %[^\n]s\n", dev->name, dev->agent, dev->args);
 			if (rv < 2) {


More information about the cluster-commits mailing list