aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM.xs12
1 files changed, 6 insertions, 6 deletions
diff --git a/URPM.xs b/URPM.xs
index bf896b2..285d483 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1000,7 +1000,6 @@ static void
update_provides_files(const URPM__Package pkg, HV *provides) {
if (pkg->h) {
STRLEN len;
- char **list = NULL;
unsigned int i;
struct rpmtd_s td_baseNames, td_dirIndexes, td_dirNames;
@@ -1030,15 +1029,16 @@ update_provides_files(const URPM__Package pkg, HV *provides) {
free(dirNames);
} else {
struct rpmtd_s td;
- headerGet(pkg->h, RPMTAG_OLDFILENAMES, &td, HEADERGET_DEFAULT);
- if (list) {
+
+ if (headerGet(pkg->h, RPMTAG_OLDFILENAMES, &td, HEADERGET_DEFAULT)) {
for (i = 0; i < rpmtdCount(&td); i++) {
- len = strlen(list[i]);
+ const char *s = rpmtdNextString(&td);
+ len = strlen(s);
- update_provide_entry(list[i], len, 0, 0, pkg, provides);
+ update_provide_entry(s, len, 0, 0, pkg, provides);
}
- free(list);
+ rpmtdFreeData(&td);
}
}
}