Fixed package info re-get crash

pull/70/head
parent 2640a6bfb2
commit 2ed0df4ad6

@ -304,11 +304,11 @@ yon_packages_info *yon_packages_get_info_struct(enum YON_PACKAGES_DB_TYPE type,
size_t size=0; size_t size=0;
alpm_list_t *licence_list = alpm_pkg_get_licenses(pkg); alpm_list_t *licence_list = alpm_pkg_get_licenses(pkg);
package_info->licence = yon_alpm_list_to_char(licence_list); package_info->licence = yon_alpm_list_to_char(licence_list);
alpm_list_free(licence_list); // alpm_list_free(licence_list);
alpm_list_t *groups_list = alpm_pkg_get_groups(pkg); alpm_list_t *groups_list = alpm_pkg_get_groups(pkg);
package_info->groups = yon_alpm_list_to_char(groups_list); package_info->groups = yon_alpm_list_to_char(groups_list);
alpm_list_free(groups_list); // alpm_list_free(groups_list);
{ {
alpm_list_t *provides_list = alpm_pkg_get_provides(pkg); alpm_list_t *provides_list = alpm_pkg_get_provides(pkg);
@ -319,7 +319,7 @@ yon_packages_info *yon_packages_get_info_struct(enum YON_PACKAGES_DB_TYPE type,
yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)provides_list->data)->name); yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)provides_list->data)->name);
} }
package_info->provides = yon_char_parsed_to_string(parsed,parsed_size, " "); package_info->provides = yon_char_parsed_to_string(parsed,parsed_size, " ");
alpm_list_free(provides_list); // alpm_list_free(provides_list);
} }
{ {
@ -331,7 +331,7 @@ yon_packages_info *yon_packages_get_info_struct(enum YON_PACKAGES_DB_TYPE type,
yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)depends_list->data)->name); yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)depends_list->data)->name);
} }
package_info->depends = yon_char_parsed_to_string(parsed,parsed_size, " "); package_info->depends = yon_char_parsed_to_string(parsed,parsed_size, " ");
alpm_list_free(depends_list); // alpm_list_free(depends_list);
} }
{ {
@ -343,7 +343,7 @@ yon_packages_info *yon_packages_get_info_struct(enum YON_PACKAGES_DB_TYPE type,
yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)optdepends_list->data)->name); yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)optdepends_list->data)->name);
} }
package_info->optional_depends = yon_char_parsed_to_string(parsed,parsed_size, " "); package_info->optional_depends = yon_char_parsed_to_string(parsed,parsed_size, " ");
alpm_list_free(optdepends_list); // alpm_list_free(optdepends_list);
} }
{ {
@ -355,7 +355,7 @@ yon_packages_info *yon_packages_get_info_struct(enum YON_PACKAGES_DB_TYPE type,
yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)conflicts_list->data)->name); yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)conflicts_list->data)->name);
} }
package_info->conflicts = yon_char_parsed_to_string(parsed,parsed_size, " "); package_info->conflicts = yon_char_parsed_to_string(parsed,parsed_size, " ");
alpm_list_free(conflicts_list); // alpm_list_free(conflicts_list);
} }
{ {
@ -367,7 +367,7 @@ yon_packages_info *yon_packages_get_info_struct(enum YON_PACKAGES_DB_TYPE type,
yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)replaces_list->data)->name); yon_char_parsed_add_or_create_if_exists(parsed,&parsed_size,((alpm_depend_t*)replaces_list->data)->name);
} }
package_info->replaces = yon_char_parsed_to_string(parsed,parsed_size, " "); package_info->replaces = yon_char_parsed_to_string(parsed,parsed_size, " ");
alpm_list_free(replaces_list); // alpm_list_free(replaces_list);
} }
int size_mod = 0; int size_mod = 0;

Loading…
Cancel
Save