diff options
Diffstat (limited to 'src/locate_metadata.c')
-rw-r--r-- | src/locate_metadata.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/locate_metadata.c b/src/locate_metadata.c index de42cc6..03e2630 100644 --- a/src/locate_metadata.c +++ b/src/locate_metadata.c @@ -60,6 +60,10 @@ cr_metadatalocation_free(struct cr_MetadataLocation *ml) cr_remove_dir(ml->local_path, NULL); } + if (ml->repomd_data) { + cr_repomd_free(ml->repomd_data); + } + g_free(ml->pri_xml_href); g_free(ml->fil_xml_href); g_free(ml->oth_xml_href); @@ -146,6 +150,7 @@ cr_parse_repomd(const char *repomd_path, mdloc = g_malloc0(sizeof(struct cr_MetadataLocation)); mdloc->repomd = g_strdup(repomd_path); mdloc->local_path = g_strdup(repopath); + mdloc->repomd_data = repomd; for (GSList *elem = repomd->records; elem; elem = g_slist_next(elem)) { cr_RepomdRecord *record = elem->data; @@ -179,8 +184,6 @@ cr_parse_repomd(const char *repomd_path, g_free(full_location_href); } - cr_repomd_free(repomd); - return mdloc; } |