Skip to content

Commit

Permalink
poll-common: Initialise g_autofree variables
Browse files Browse the repository at this point in the history
These are both unconditionally assigned to before going out of scope, so
this is not a correctness fix as such – but initialising them now
prevents this potentially becoming a correctness issue in future, and
also stops future readers wondering if this is correct.

https://phabricator.endlessm.com/T35247
  • Loading branch information
wjt committed Mar 21, 2024
1 parent 79ba404 commit 06bddf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eos-updater/poll-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ checkpoint_blocked_event_payload_new (const char *booted_ref,
EuuCheckpointBlock reason)
{
g_autoptr(GHashTable) hw_descriptors = NULL;
g_autofree gchar *vendor, *product;
g_autofree gchar *vendor = NULL, *product = NULL;
const char *reason_nick;

hw_descriptors = get_hw_descriptors ();
Expand Down

0 comments on commit 06bddf2

Please sign in to comment.