diff options
-rw-r--r-- | URPM.xs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); } } } |