diff --git a/lib/rpmds.c b/lib/rpmds.c index 3290d22822..ea1a74c5d1 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -691,12 +691,8 @@ int rpmdsNext(rpmds ds) { int i = -1; - if (ds != NULL && ++ds->i >= 0) { - if (ds->i < ds->Count) { - i = ds->i; - ds->DNEVR = _free(ds->DNEVR); - } else - ds->i = -1; + if (ds != NULL) + i = rpmdsSetIx(ds, ds->i + 1); return i; }