From d3aaa17a17a108862d377cbbee2349beebbe47e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20Pavlas?= Date: Fri, 27 Jan 2012 14:58:01 +0100 Subject: [PATCH 1/3] repo_write: fix key packing --- ext/repo_write.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/repo_write.c b/ext/repo_write.c index 0c5628e20..2fac8ffb0 100644 --- a/ext/repo_write.c +++ b/ext/repo_write.c @@ -1451,8 +1451,8 @@ for (i = 1; i < target.nkeys; i++) target.keys[n] = target.keys[i]; if (keyarrayp) { - *keyarrayp[2 * n - 2] = *keyarrayp[2 * i - 2]; - *keyarrayp[2 * n - 1] = *keyarrayp[2 * i - 1]; + (*keyarrayp)[2 * n - 2] = (*keyarrayp)[2 * i - 2]; + (*keyarrayp)[2 * n - 1] = (*keyarrayp)[2 * i - 1]; } } n++; @@ -1461,8 +1461,8 @@ for (i = 1; i < target.nkeys; i++) if (keyarrayp) { /* terminate array */ - *keyarrayp[2 * n - 2] = 0; - *keyarrayp[2 * n - 1] = 0; + (*keyarrayp)[2 * n - 2] = 0; + (*keyarrayp)[2 * n - 1] = 0; } /* update schema data to the new key ids */ From 458c7b11c9239fb0f2be97dc5929be85f378ab8e Mon Sep 17 00:00:00 2001 From: Ales Kozumplik Date: Wed, 15 Feb 2012 10:50:11 +0100 Subject: [PATCH 2/3] fix a small memory leak: pool->id2color. --- src/pool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pool.c b/src/pool.c index 0d84f3480..a633767ae 100644 --- a/src/pool.c +++ b/src/pool.c @@ -88,6 +88,7 @@ pool_free(Pool *pool) pool_freeidhashes(pool); pool_freeallrepos(pool, 1); solv_free(pool->id2arch); + solv_free(pool->id2color); solv_free(pool->solvables); stringpool_free(&pool->ss); solv_free(pool->rels); From a18f35dc8d3d412f289555043772737adc9c7c29 Mon Sep 17 00:00:00 2001 From: Ales Kozumplik Date: Wed, 15 Feb 2012 10:51:22 +0100 Subject: [PATCH 3/3] cosmetic: fix misleading comment in repodata.c --- src/repodata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repodata.c b/src/repodata.c index 2a9fcba48..5e5cfed65 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -1123,7 +1123,7 @@ enum { di_entersolvablekey }; -/* see repo.h for documentation */ +/* see dataiterator.h for documentation */ int dataiterator_init(Dataiterator *di, Pool *pool, Repo *repo, Id p, Id keyname, const char *match, int flags) {