From 1c428641e90d68f0c5db5aad251c5c3e8d2489b3 Mon Sep 17 00:00:00 2001 From: Diaa Sami Date: Mon, 22 Jan 2024 14:58:55 +0100 Subject: [PATCH] dnfjson: fix pointer aliasing issue --- pkg/dnfjson/dnfjson.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/dnfjson/dnfjson.go b/pkg/dnfjson/dnfjson.go index 4962448a98..2587c2e2f5 100644 --- a/pkg/dnfjson/dnfjson.go +++ b/pkg/dnfjson/dnfjson.go @@ -283,9 +283,12 @@ func (s *Solver) reposFromRPMMD(rpmRepos []rpmmd.RepoConfig) ([]repoConfig, erro MirrorList: rr.MirrorList, GPGKeys: rr.GPGKeys, MetadataExpire: rr.MetadataExpire, - ModuleHotfixes: rr.ModuleHotfixes, repoHash: rr.Hash(), } + if rr.ModuleHotfixes != nil { + val := *rr.ModuleHotfixes + dr.ModuleHotfixes = &val + } if rr.CheckGPG != nil { dr.CheckGPG = *rr.CheckGPG