When the flag is force-overwrite and replace files.
opkg will not free the root_filename well.
git-svn-id: http://opkg.googlecode.com/svn/trunk@202
e8e0d7a0-c8d9-11dd-a880-
a1081c7ac358
str_list_t *files_list;
str_list_elt_t *iter;
+ char *root_filename = NULL;
+
int clashes = 0;
files_list = pkg_get_installed_files(pkg);
for (iter = str_list_first(files_list); iter; iter = str_list_next(files_list, iter)) {
- char *root_filename;
char *filename = (char *) iter->data;
+ if (root_filename) {
+ free(root_filename);
+ root_filename = NULL;
+ }
root_filename = root_filename_alloc(conf, filename);
if (file_exists(root_filename) && (! file_is_dir(root_filename))) {
pkg_t *owner;
}
}
- free(root_filename);
+ }
+ if (root_filename) {
+ free(root_filename);
+ root_filename = NULL;
}
pkg_free_installed_files(pkg);