5a40a02
commit 077d2c850cf0a719d7abacc3256168d60a4ec7bb
5a40a02
Author: Panu Matilainen <pmatilai@redhat.com>
5a40a02
Date:   Tue Apr 5 17:33:12 2011 +0300
5a40a02
5a40a02
    Dont reference transaction set from transaction elements
5a40a02
    - Elements referencing ts prevents rpmtsFree() from freeing anything
5a40a02
      unless the caller does rpmtsEmpty() first. Oops. Undo the braindamage
5a40a02
      from commit 8f7c2d7063df6d1057425d014ce4168d46c5e7d9.
5a40a02
5a40a02
diff --git a/lib/rpmte.c b/lib/rpmte.c
5a40a02
index 860b3f4..dfd7b6f 100644
5a40a02
--- a/lib/rpmte.c
5a40a02
+++ b/lib/rpmte.c
5a40a02
@@ -291,7 +291,6 @@ rpmte rpmteFree(rpmte te)
5a40a02
 	rpmfsFree(te->fs);
5a40a02
 	rpmpsFree(te->probs);
5a40a02
 	rpmteCleanDS(te);
5a40a02
-	rpmtsFree(te->ts);
5a40a02
 
5a40a02
 	argvFree(te->collections);
5a40a02
 	argvFree(te->lastInCollectionsAny);
5a40a02
@@ -308,7 +307,7 @@ rpmte rpmteNew(rpmts ts, Header h, rpmElementType type, fnpyKey key,
5a40a02
 	       rpmRelocation * relocs)
5a40a02
 {
5a40a02
     rpmte p = xcalloc(1, sizeof(*p));
5a40a02
-    p->ts = rpmtsLink(ts);
5a40a02
+    p->ts = ts;
5a40a02
     p->type = type;
5a40a02
     addTE(p, h, key, relocs);
5a40a02
     switch (type) {