]> git.proxmox.com Git - pve-cluster.git/commitdiff
pmxcfs: fix segfault in cfs_create_status_msg
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 13 Jun 2017 13:22:05 +0000 (15:22 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 13 Jun 2017 13:52:59 +0000 (15:52 +0200)
it's possible to request a status message for a no longer
existing nodename in a standalone setting (e.g., node was
renamed after pmxcfs was started).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
data/src/status.c

index 3896fcbe910f6840b228056442eefb6804e9963d..14a40c4801372b4529b77169855a688d7e6ac20b 100644 (file)
@@ -1298,7 +1298,7 @@ cfs_create_status_msg(
 
        if (!nodename || !nodename[0] || !strcmp(nodename, cfs.nodename)) {
                kvhash = cfs_status.kvhash;
-       } else {
+       } else if (cfs_status.clinfo && cfs_status.clinfo->nodes_byname) {
                cfs_clnode_t *clnode;
                if ((clnode = g_hash_table_lookup(cfs_status.clinfo->nodes_byname, nodename)))
                        kvhash = clnode->kvhash;