Fix minor header iterator leak in rpmReSign()

- fix dumb double-initialization error introduced somewhere between
  4.4 and 4.6, also while-loop is more natural here than for-loop
This commit is contained in:
Panu Matilainen 2010-05-06 12:28:23 +03:00
parent a592b14fe2
commit 834c838347
1 changed files with 2 additions and 4 deletions

View File

@ -221,12 +221,10 @@ static int rpmReSign(rpmts ts, QVA_t qva, ARGV_const_t argv)
oh = headerCopyLoad(utd.data);
hi = headerInitIterator(oh);
for (hi = headerInitIterator(oh);
headerNext(hi, &copytd);
rpmtdFreeData(&copytd))
{
while (headerNext(hi, &copytd)) {
if (copytd.data)
xx = headerPut(nh, &copytd, HEADERPUT_DEFAULT);
rpmtdFreeData(&copytd);
}
hi = headerFreeIterator(hi);
oh = headerFree(oh);