Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:Update
pacemaker.14737
pacemaker-libcrmcluster-crm_strdup_printf-inste...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-libcrmcluster-crm_strdup_printf-instead-of-calloc.patch of Package pacemaker.14737
commit a3c5044578be55f2b9fabf1f85d38f3ad4b1329a Author: Ken Gaillot <kgaillot@redhat.com> Date: Tue Nov 28 08:58:23 2017 -0600 Low: libcrmcluster: use crm_strdup_printf() instead of calloc() simplifies code, asserts on error, and allocates proper amount of memory Index: pacemaker-1.1.16+20170320.77ea74d/lib/cluster/cluster.c =================================================================== --- pacemaker-1.1.16+20170320.77ea74d.orig/lib/cluster/cluster.c +++ pacemaker-1.1.16+20170320.77ea74d/lib/cluster/cluster.c @@ -110,16 +110,7 @@ get_corosync_uuid(crm_node_t *node) } else if (!uname_is_uuid() && is_corosync_cluster()) { if (node->id > 0) { - int len = 32; - char *buffer = NULL; - - buffer = calloc(1, (len + 1)); - if (buffer != NULL) { - snprintf(buffer, len, "%u", node->id); - } - - return buffer; - + return crm_strdup_printf("%u", node->id); } else { crm_info("Node %s is not yet known by corosync", node->uname); }
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