Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:Update
pacemaker.13253
pacemaker-libcrmcluster-avoid-potential-use-of-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-libcrmcluster-avoid-potential-use-of-NULL.patch of Package pacemaker.13253
commit fce929819f4fd37baac1e72a7c0bb71b3f390e50 Author: Ken Gaillot <kgaillot@redhat.com> Date: Wed Apr 4 16:06:01 2018 -0500 Low: libcrmcluster: avoid potential use-of-NULL diff --git a/lib/cluster/election.c b/lib/cluster/election.c index af3126690..10294f914 100644 --- a/lib/cluster/election.c +++ b/lib/cluster/election.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2016 Andrew Beekhof <andrew@beekhof.net> + * Copyright 2004-2018 Andrew Beekhof <andrew@beekhof.net> * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. @@ -93,14 +93,14 @@ election_remove(election_t *e, const char *uname) void election_reset(election_t *e) { - crm_trace("Resetting election %s", e->name); - if(e) { + if (e != NULL) { + crm_trace("Resetting election %s", e->name); mainloop_timer_stop(e->timeout); - } - if (e && e->voted) { - crm_trace("Destroying voted cache with %d members", g_hash_table_size(e->voted)); - g_hash_table_destroy(e->voted); - e->voted = NULL; + if (e->voted) { + crm_trace("Destroying voted cache with %d members", g_hash_table_size(e->voted)); + g_hash_table_destroy(e->voted); + e->voted = NULL; + } } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor