Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
32af3ff
Devel: Use more threads when running cppcheck.
clumens Apr 7, 2026
6ae123f
Refactor: libpacemaker: Check that instance is not NULL.
clumens Apr 7, 2026
d290537
Refactor: daemons: Don't assign to a variable we're just going to ove…
clumens Apr 7, 2026
1522dbc
Refactor: libcrmcluster: Make static analysis happy with proc2text.
clumens Apr 7, 2026
9fbc3c9
Refactor: daemons: Unindent code in free_xml_with_position.
clumens Apr 8, 2026
e1c70c6
Refactor: daemons,libs,tools: Add checks to help static analysis.
clumens Apr 8, 2026
4eea0e0
Refactor: daemons: Rearrange the loop in load_env_vars.
clumens Apr 8, 2026
0a29fe0
Devel: Use more threads when running scan-build.
clumens Apr 8, 2026
ff370eb
Refactor: libcrmcommon: Ignore the return value of g_list_append.
clumens Apr 13, 2026
3a80fbd
Refactor: libpacemaker: Avoid a dead assignment in promotion_score_ap…
clumens Apr 13, 2026
c85e8a4
Refactor: libcrmcommon: Explicitly check filename against NULL.
clumens Apr 13, 2026
9cb24fe
Low: libservices: Deal with fgets errors in services__get_lsb_metadata.
clumens Apr 13, 2026
9bb5c5d
Low: daemons,libcib: Fix memory leaks in IPC code.
clumens Apr 14, 2026
b5e0be3
Low: libpacemaker: If process_rsc_history exits early, free the list.
clumens Apr 15, 2026
70a8d07
Low: libpe: Free elements of rsc->priv->ticket_constraints...
clumens Apr 15, 2026
9c329f2
Refactor: libpacemaker: Simplify the rsc_ticket_t type.
clumens Apr 16, 2026
57d7c37
Low: libcrmcommon: Properly return errno from pcmk__bare_output_new.
clumens Apr 16, 2026
0a1cfb7
Med: libpacemaker: Fix a segfault in order_resource_actions_after.
clumens Apr 16, 2026
7ce46ea
Low: libpe: If pe__clone_default exits early, free the lists.
clumens Apr 16, 2026
a470fc3
Low: tools: Fix memory leaks when printing crm_verify warnings/errors.
clumens Apr 16, 2026
1905443
Low: tools: Free the list at the end of cli_resource_print_operations.
clumens Apr 16, 2026
2be2eb8
Low: libpacemaker: Fix a memory leak in inject_action.
clumens Apr 16, 2026
ec588b0
Test: valgrind: Make the bash reader_loop suppression less restrictive.
clumens Apr 16, 2026
9ff45e1
Test: valgrind: Add another suppression for a glib iconv leak.
clumens Apr 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions daemons/controld/controld_te_actions.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2025 the Pacemaker project contributors
* Copyright 2004-2026 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
Expand Down Expand Up @@ -703,7 +703,7 @@ controld_register_graph_functions(void)
void
notify_crmd(pcmk__graph_t *graph)
{
const char *type = "unknown";
const char *type = NULL;
Comment thread
clumens marked this conversation as resolved.
enum crmd_fsa_input event = I_NULL;

pcmk__debug("Processing transition completion in state %s",
Expand Down
1 change: 1 addition & 0 deletions devel/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ cppcheck:
--include=/usr/include/qb/qblog.h \
--output-file=$(CPPCHECK_OUT) \
--max-configs=30 --inline-suppr -q \
-j $(shell nproc --ignore=1) \
--library=posix --library=gnu --library=gtk \
$(GLIB_INCL_DEF_CFLAGS) -D__GNUC__ \
$(foreach dir,$(CPPCHECK_DIRS),$(top_srcdir)/$(dir))
Expand Down
15 changes: 7 additions & 8 deletions lib/cluster/membership.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2025 the Pacemaker project contributors
* Copyright 2004-2026 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
Expand Down Expand Up @@ -1085,17 +1085,16 @@ update_peer_uname(pcmk__node_status_t *node, const char *uname)
static inline const char *
proc2text(enum crm_proc_flag proc)
{
const char *text = "unknown";

switch (proc) {
case crm_proc_none:
text = "none";
break;
return "none";

case crm_proc_cpg:
text = "corosync-cpg";
break;
return "corosync-cpg";

default:
return "unknown";
}
return text;
}

/*!
Expand Down
48 changes: 26 additions & 22 deletions lib/common/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,8 @@ free_xml_with_position(xmlNode *node, int position)
{
xmlDoc *doc = NULL;
xml_node_private_t *nodepriv = NULL;
xml_doc_private_t *docpriv = NULL;
GString *xpath = NULL;

if (node == NULL) {
return pcmk_rc_ok;
Expand Down Expand Up @@ -765,37 +767,39 @@ free_xml_with_position(xmlNode *node, int position)
return EACCES;
}

if (pcmk__xml_doc_all_flags_set(node->doc, pcmk__xf_tracking)
&& !pcmk__is_set(nodepriv->flags, pcmk__xf_created)) {
if (!pcmk__xml_doc_all_flags_set(node->doc, pcmk__xf_tracking)
|| pcmk__is_set(nodepriv->flags, pcmk__xf_created)) {
pcmk__xml_free_node(node);
return pcmk_rc_ok;
}

xml_doc_private_t *docpriv = doc->_private;
GString *xpath = pcmk__element_xpath(node);
docpriv = doc->_private;
Comment thread
clumens marked this conversation as resolved.
xpath = pcmk__element_xpath(node);

if (xpath != NULL) {
pcmk__deleted_xml_t *deleted_obj = NULL;
if (xpath != NULL) {
pcmk__deleted_xml_t *deleted_obj = NULL;

pcmk__trace("Deleting %s %p from %p", xpath->str, node, doc);
pcmk__trace("Deleting %s %p from %p", xpath->str, node, doc);

deleted_obj = pcmk__assert_alloc(1, sizeof(pcmk__deleted_xml_t));
deleted_obj->path = g_string_free(xpath, FALSE);
deleted_obj->position = -1;
deleted_obj = pcmk__assert_alloc(1, sizeof(pcmk__deleted_xml_t));
deleted_obj->path = g_string_free(xpath, FALSE);
deleted_obj->position = -1;

// Record the position only for XML comments for now
if (node->type == XML_COMMENT_NODE) {
if (position >= 0) {
deleted_obj->position = position;
// Record the position only for XML comments for now
if (node->type == XML_COMMENT_NODE) {
if (position >= 0) {
deleted_obj->position = position;

} else {
deleted_obj->position = pcmk__xml_position(node,
pcmk__xf_skip);
}
} else {
deleted_obj->position = pcmk__xml_position(node, pcmk__xf_skip);
}

docpriv->deleted_objs = g_list_append(docpriv->deleted_objs,
deleted_obj);
pcmk__xml_doc_set_flags(node->doc, pcmk__xf_dirty);
}

docpriv->deleted_objs = g_list_append(docpriv->deleted_objs,
deleted_obj);
pcmk__xml_doc_set_flags(node->doc, pcmk__xf_dirty);
}

pcmk__xml_free_node(node);
return pcmk_rc_ok;
}
Expand Down
4 changes: 3 additions & 1 deletion lib/pacemaker/pcmk_sched_clone.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2025 the Pacemaker project contributors
* Copyright 2004-2026 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
Expand Down Expand Up @@ -566,6 +566,8 @@ probe_anonymous_clone(pcmk_resource_t *clone, pcmk_node_t *node)
pcmk_resource_t *instance = (pcmk_resource_t *) iter->data;
const pcmk_node_t *instance_node = NULL;

pcmk__assert(instance != NULL);
Comment thread
clumens marked this conversation as resolved.

instance_node = instance->priv->fns->location(instance, NULL,
pcmk__rsc_node_assigned);
if (pcmk__same_node(instance_node, node)) {
Expand Down