Skip to content
Merged
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions lib/common/output.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2025 the Pacemaker project contributors
* Copyright 2019-2026 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
Expand All @@ -10,6 +10,7 @@
#include <crm_internal.h>

#include <stdbool.h>
#include <glib.h>

#include <crm/common/util.h>
#include <crm/common/xml.h>
Expand Down Expand Up @@ -92,8 +93,7 @@ pcmk__bare_output_new(pcmk__output_t **out, const char *fmt_name,
} else {
(*out)->dest = fopen(filename, "w");
if ((*out)->dest == NULL) {
pcmk__output_free(*out);
*out = NULL;
g_clear_pointer(out, pcmk__output_free);
return errno;
}
}
Expand All @@ -102,7 +102,7 @@ pcmk__bare_output_new(pcmk__output_t **out, const char *fmt_name,
(*out)->messages = pcmk__strkey_table(free, NULL);

if ((*out)->init(*out) == false) {
pcmk__output_free(*out);
g_clear_pointer(out, pcmk__output_free);
return ENOMEM;
}

Expand Down