gchar *pri_xml_name = g_strconcat("repodata/", "primary.xml.gz", NULL);
gchar *fil_xml_name = g_strconcat("repodata/", "filelists.xml.gz", NULL);
gchar *oth_xml_name = g_strconcat("repodata/", "other.xml.gz", NULL);
- gchar *groupfile_name = g_strconcat("repodata/", get_filename(groupfile), NULL);
+ gchar *groupfile_name = NULL;
+ if (groupfile) {
+ groupfile_name = g_strconcat("repodata/", get_filename(groupfile), NULL);
+ }
struct repomdResult *repomd_res = xml_repomd(out_dir, cmd_options.unique_md_filenames, pri_xml_name, fil_xml_name, oth_xml_name, NULL, NULL, NULL, groupfile_name, &cmd_options.checksum_type);
gchar *repomd_path = g_strconcat(out_repo, "repomd.xml", NULL);
g_free(in_repo);
g_free(out_repo);
+ g_free(tmp_out_repo);
g_free(in_dir);
g_free(out_dir);
g_free(pri_xml_filename);
void process_groupfile(const char *base_path, struct repomdData *groupfile,
struct repomdData *cgroupfile, ChecksumType *checksum_type)
{
- if (!groupfile || !(groupfile->location_href) || !strlen(groupfile->location_href)) {
+ if (!groupfile || !(groupfile->location_href) || !strlen(groupfile->location_href) || !cgroupfile) {
return;
}
if (!g_file_test(path, G_FILE_TEST_EXISTS|G_FILE_TEST_IS_REGULAR)) {
// File doesn't exists
g_warning(MODULE"process_groupfile: File %s doesn't exists", path);
+ g_free(path);
+ g_free(cpath);
return;
}
res->fil_sqlite_location = fil_sqlite ? g_strdup(fil_sqlite->location_href) : NULL;
res->oth_sqlite_location = oth_sqlite ? g_strdup(oth_sqlite->location_href) : NULL;
res->groupfile_location = groupfile ? g_strdup(groupfile->location_href) : NULL;
- res->cgroupfile_location = cgroupfile ? (char *) cgroupfile->location_href : NULL;
+ res->cgroupfile_location = cgroupfile ? g_strdup(cgroupfile->location_href) : NULL;
// Get revision
struct repomdData *fil_sqlite_rd = NULL;
struct repomdData *oth_sqlite_rd = NULL;
struct repomdData *groupfile_rd = NULL;
- struct repomdData *cgroupfile_rd = NULL;
+ struct repomdData *cgroupfile_rd = NULL;
if (pri_xml) {
pri_xml_rd = new_repomddata();