Scan Results

List of Findings

Error: INCOMPLETE_DEALLOCATOR (CWE-404): [#def1]
/pacemaker/lib/common/results.c:1316: allocation: Memory is allocated.
/pacemaker/lib/common/strings.c:1261: path: Condition "str != NULL", taking true branch.
/pacemaker/lib/common/strings.c:1262: alloc_fn: Storage is returned from allocation function "strdup".
/pacemaker/lib/common/strings.c:1262: assign: Assigning: "result" = "strdup(str)".
/pacemaker/lib/common/strings.c:1264: path: Condition "result == NULL", taking false branch.
/pacemaker/lib/common/strings.c:1268: return_alloc: Returning allocated memory "result".
/pacemaker/lib/common/results.c:1316: allocation: The field "dst->exit_reason" is allocated, but not released in the identified deallocator.
/pacemaker/lib/common/results.c:1272: deallocator: Deallocator for "struct [unnamed type of 'pcmk__action_result_t']".

Error: INCOMPLETE_DEALLOCATOR (CWE-404): [#def2]
/pacemaker/lib/common/mainloop.c:955: allocation: Memory is allocated.
/pacemaker/lib/common/mainloop.c:955: allocation: The field "client->channel" is allocated, but not released in the identified deallocator.
/pacemaker/lib/common/mainloop.c:784: deallocator: Deallocator for "struct mainloop_io_s".

Error: RESOURCE_LEAK (CWE-404): [#def3]
/pacemaker/lib/cib/cib_native.c:490: alloc_arg: "cib_new_variant" allocates memory that is stored into "cib_new_variant()->cmds".
/pacemaker/lib/cib/cib_client.c:612: path: Condition "new_cib == NULL", taking false branch.
/pacemaker/lib/cib/cib_client.c:627: alloc_fn: Storage is returned from allocation function "calloc".
/pacemaker/lib/cib/cib_client.c:627: assign: Assigning: "new_cib->cmds" = "calloc(1UL, 232UL)".
/pacemaker/lib/cib/cib_client.c:629: path: Condition "new_cib->cmds == NULL", taking false branch.
/pacemaker/lib/cib/cib_client.c:666: return_alloc: Returning "new_cib", where "new_cib->cmds" is allocated memory.
/pacemaker/lib/cib/cib_native.c:490: var_assign: Assigning: "cib->cmds" = "cib_new_variant()->cmds".
/pacemaker/lib/cib/cib_native.c:492: path: Condition "cib == NULL", taking false branch.
/pacemaker/lib/cib/cib_native.c:498: path: Condition "native == NULL", taking true branch.
/pacemaker/lib/cib/cib_native.c:499: leaked_storage: Freeing "cib" without freeing its pointer field "cmds" leaks the storage that "cmds" points to.

Error: RESOURCE_LEAK (CWE-404): [#def4]
/pacemaker/lib/cib/cib_remote.c:718: alloc_arg: "cib_new_variant" allocates memory that is stored into "cib_new_variant()->cmds".
/pacemaker/lib/cib/cib_client.c:612: path: Condition "new_cib == NULL", taking false branch.
/pacemaker/lib/cib/cib_client.c:627: alloc_fn: Storage is returned from allocation function "calloc".
/pacemaker/lib/cib/cib_client.c:627: assign: Assigning: "new_cib->cmds" = "calloc(1UL, 232UL)".
/pacemaker/lib/cib/cib_client.c:629: path: Condition "new_cib->cmds == NULL", taking false branch.
/pacemaker/lib/cib/cib_client.c:666: return_alloc: Returning "new_cib", where "new_cib->cmds" is allocated memory.
/pacemaker/lib/cib/cib_remote.c:718: var_assign: Assigning: "cib->cmds" = "cib_new_variant()->cmds".
/pacemaker/lib/cib/cib_remote.c:720: path: Condition "cib == NULL", taking false branch.
/pacemaker/lib/cib/cib_remote.c:726: path: Condition "private == NULL", taking true branch.
/pacemaker/lib/cib/cib_remote.c:727: leaked_storage: Freeing "cib" without freeing its pointer field "cmds" leaks the storage that "cmds" points to.

Error: RESOURCE_LEAK (CWE-404): [#def5]
/pacemaker/lib/cib/cib_file.c:758: path: Condition "cib_location == NULL", taking true branch.
/pacemaker/lib/cib/cib_file.c:760: path: Condition "cib_location == NULL", taking false branch.
/pacemaker/lib/cib/cib_file.c:765: alloc_arg: "cib_new_variant" allocates memory that is stored into "cib_new_variant()->cmds".
/pacemaker/lib/cib/cib_client.c:612: path: Condition "new_cib == NULL", taking false branch.
/pacemaker/lib/cib/cib_client.c:627: alloc_fn: Storage is returned from allocation function "calloc".
/pacemaker/lib/cib/cib_client.c:627: assign: Assigning: "new_cib->cmds" = "calloc(1UL, 232UL)".
/pacemaker/lib/cib/cib_client.c:629: path: Condition "new_cib->cmds == NULL", taking false branch.
/pacemaker/lib/cib/cib_client.c:666: return_alloc: Returning "new_cib", where "new_cib->cmds" is allocated memory.
/pacemaker/lib/cib/cib_file.c:765: var_assign: Assigning: "cib->cmds" = "cib_new_variant()->cmds".
/pacemaker/lib/cib/cib_file.c:766: path: Condition "cib == NULL", taking false branch.
/pacemaker/lib/cib/cib_file.c:771: path: Condition "filename == NULL", taking true branch.
/pacemaker/lib/cib/cib_file.c:772: leaked_storage: Freeing "cib" without freeing its pointer field "cmds" leaks the storage that "cmds" points to.

Error: RESOURCE_LEAK (CWE-404): [#def6]
/pacemaker/lib/cib/cib_file.c:758: path: Condition "cib_location == NULL", taking true branch.
/pacemaker/lib/cib/cib_file.c:760: path: Condition "cib_location == NULL", taking false branch.
/pacemaker/lib/cib/cib_file.c:765: alloc_arg: "cib_new_variant" allocates memory that is stored into "cib_new_variant()->cmds".
/pacemaker/lib/cib/cib_client.c:612: path: Condition "new_cib == NULL", taking false branch.
/pacemaker/lib/cib/cib_client.c:627: alloc_fn: Storage is returned from allocation function "calloc".
/pacemaker/lib/cib/cib_client.c:627: assign: Assigning: "new_cib->cmds" = "calloc(1UL, 232UL)".
/pacemaker/lib/cib/cib_client.c:629: path: Condition "new_cib->cmds == NULL", taking false branch.
/pacemaker/lib/cib/cib_client.c:666: return_alloc: Returning "new_cib", where "new_cib->cmds" is allocated memory.
/pacemaker/lib/cib/cib_file.c:765: var_assign: Assigning: "cib->cmds" = "cib_new_variant()->cmds".
/pacemaker/lib/cib/cib_file.c:766: path: Condition "cib == NULL", taking false branch.
/pacemaker/lib/cib/cib_file.c:771: path: Condition "filename == NULL", taking false branch.
/pacemaker/lib/cib/cib_file.c:777: path: Condition "private == NULL", taking true branch.
/pacemaker/lib/cib/cib_file.c:778: leaked_storage: Freeing "cib" without freeing its pointer field "cmds" leaks the storage that "cmds" points to.

Error: RESOURCE_LEAK (CWE-404): [#def7]
/pacemaker/lib/common/alerts.c:366: path: Condition "alert != NULL", taking true branch.
/pacemaker/lib/common/alerts.c:375: path: Condition "alert_id == NULL", taking false branch.
/pacemaker/lib/common/alerts.c:379: path: Condition "alert_path == NULL", taking false branch.
/pacemaker/lib/common/alerts.c:387: path: Condition "unpack_alert(alert, entry, &max_timeout) != pcmk_rc_ok", taking false branch.
/pacemaker/lib/common/alerts.c:394: path: Condition "entry->tstamp_format == NULL", taking false branch.
/pacemaker/lib/common/alerts.c:399: path: Switch case default.
/pacemaker/lib/common/alerts.c:399: path: Condition "trace_cs == NULL", taking true branch.
/pacemaker/lib/common/alerts.c:399: path: Condition "crm_is_callsite_active(trace_cs, _level, 0)", taking false branch.
/pacemaker/lib/common/alerts.c:399: path: Breaking from switch.
/pacemaker/lib/common/alerts.c:404: path: Condition "recipient != NULL", taking true branch.
/pacemaker/lib/common/alerts.c:409: alloc_arg: "pcmk__dup_alert" allocates memory that is stored into "pcmk__dup_alert(entry)->recipient".
/pacemaker/lib/common/alerts.c:97: alloc_fn: Storage is returned from allocation function "pcmk__str_copy_as".
/pacemaker/lib/common/strings.c:1261: path: Condition "str != NULL", taking true branch.
/pacemaker/lib/common/strings.c:1262: alloc_fn: Storage is returned from allocation function "strdup".
/pacemaker/lib/common/strings.c:1262: assign: Assigning: "result" = "strdup(str)".
/pacemaker/lib/common/strings.c:1264: path: Condition "result == NULL", taking false branch.
/pacemaker/lib/common/strings.c:1268: return_alloc: Returning allocated memory "result".
/pacemaker/lib/common/alerts.c:97: assign: Assigning: "new_entry->recipient" = "pcmk__str_copy_as("alerts.c", <anonymous>, 97U, entry->recipient)".
/pacemaker/lib/common/alerts.c:98: path: Condition "entry->select_attribute_name", taking true branch.
/pacemaker/lib/common/alerts.c:101: return_alloc: Returning "new_entry", where "new_entry->recipient" is allocated memory.
/pacemaker/lib/common/alerts.c:409: var_assign: Assigning: "recipient_entry->recipient" = "pcmk__dup_alert(entry)->recipient".
/pacemaker/lib/common/alerts.c:413: overwrite_var: Overwriting "recipient_entry->recipient" in "recipient_entry->recipient = pcmk__xe_get_copy(recipient, "value")" leaks the storage that "recipient_entry->recipient" points to.