Dont leak memory on rpm.ds iteration
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 22 Sep 2009 18:01:01 +0000 (21:01 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 22 Sep 2009 18:01:01 +0000 (21:01 +0300)
python/rpmds-py.c

index 67af3fb..4a55c72 100644 (file)
@@ -217,8 +217,6 @@ rpmds_iternext(rpmdsObject * s)
        rpmTag tagN = rpmdsTagN(s->ds);
        rpmsenseFlags Flags = rpmdsFlags(s->ds);
 
-       if (N != NULL) N = xstrdup(N);
-       if (EVR != NULL) EVR = xstrdup(EVR);
        result = (PyObject *) rpmds_Wrap( rpmdsSingle(tagN, N, EVR, Flags) );
     } else
        s->active = 0;