Skip to content

Commit

Permalink
Merge pull request #1230 from kgaillot/fixes
Browse files Browse the repository at this point in the history
Avoid memory leak
  • Loading branch information
kgaillot committed Feb 17, 2017
2 parents f63a7ff + d35f28b commit 68956cf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cib/cibio.h
Expand Up @@ -43,6 +43,6 @@ extern xmlNode *readCibXmlFile(const char *dir, const char *file, gboolean disca
extern int activateCibBuffer(char *buffer, const char *filename);
extern int activateCibXml(xmlNode * doc, gboolean to_disk, const char *op);
extern crm_trigger_t *cib_writer;
extern gboolean cib_writes_enabled;
extern volatile gboolean cib_writes_enabled;

#endif
5 changes: 4 additions & 1 deletion cib/main.c
Expand Up @@ -75,7 +75,10 @@ GMainLoop *mainloop = NULL;
const char *cib_root = NULL;
char *cib_our_uname = NULL;
gboolean preserve_status = FALSE;
gboolean cib_writes_enabled = TRUE;

/* volatile because it may be changed in a signal handler */
volatile gboolean cib_writes_enabled = TRUE;

int remote_fd = 0;
int remote_tls_fd = 0;

Expand Down
4 changes: 2 additions & 2 deletions doc/Pacemaker_Explained/en-US/Ch-Advanced-Options.txt
Expand Up @@ -21,7 +21,7 @@ node.

|CIB_user
|$USER
|The user to connect as. Needs to be part of the +hacluster+ group on
|The user to connect as. Needs to be part of the +haclient+ group on
the target host.
indexterm:[Environment Variable,CIB_user]

Expand All @@ -48,7 +48,7 @@ node.
|=========================================================

So, if *c001n01* is an active cluster node and is listening on port 1234
for connections, and *someuser* is a member of the *hacluster* group,
for connections, and *someuser* is a member of the *haclient* group,
then the following would prompt for *someuser*'s password and return
the cluster's current configuration:

Expand Down
2 changes: 1 addition & 1 deletion lib/cib/cib_attrs.c
Expand Up @@ -520,7 +520,7 @@ query_node_uuid(cib_t * the_cib, const char *uname, char **uuid, int *is_remote_
rc = -ENXIO;
}
free(xpath_string);
free(xml_search);
free_xml(xml_search);

if (rc != pcmk_ok) {
crm_debug("Could not map node name '%s' to a UUID: %s",
Expand Down

0 comments on commit 68956cf

Please sign in to comment.