Skip to content

managerd: Fix crash when static-delta contains no refs

Walter Lozano requested to merge wip/wlozano/ref-fix-v2023 into apertis/v2023-updates

aum_get_metadata_collection_refs() checks whether the commit has ref-bindings before trying to duplicate them, but it unconditionally tries to log them. This results in a null pointer dereference if they are missing.

Move the logging of references into the conditional block, and log a different message if no references are found.

Fixes: b66b0704 ("Use separate function for gathering refs from commit") Signed-off-by: Ben Hutchings ben.hutchings@mind.be

Merge request reports

Loading