Skip to content

Commit

Permalink
prepare-root: Fix crash if no keys were found
Browse files Browse the repository at this point in the history
Handle a NULL pointer.
  • Loading branch information
cgwalters committed Feb 9, 2024
1 parent 7d9fa8e commit 95f4bb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libotcore/otcore-prepare-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ otcore_load_config (int rootfs_fd, const char *filename, GError **error)
void
otcore_free_composefs_config (ComposefsConfig *config)
{
g_ptr_array_unref (config->pubkeys);
g_clear_pointer (&config->pubkeys, g_ptr_array_unref);
g_free (config->signature_pubkey);
g_free (config);
}
Expand Down

0 comments on commit 95f4bb6

Please sign in to comment.