summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-01-16 10:29:49 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-01-16 10:29:49 +0200
commitfc57b7310174cb0ef31df7f22b7df1f588cdc694 (patch)
tree55cb5995dea813990a36fb91efe9d99cc4c3a9d4 /src
parent2ea61da9d99a64aa0358b9186447310c98de9a77 (diff)
downloadapk-tools-fc57b7310174cb0ef31df7f22b7df1f588cdc694.tar.gz
apk-tools-fc57b7310174cb0ef31df7f22b7df1f588cdc694.tar.bz2
apk-tools-fc57b7310174cb0ef31df7f22b7df1f588cdc694.tar.xz
apk-tools-fc57b7310174cb0ef31df7f22b7df1f588cdc694.zip
db: fix loading of world after previous commits
Diffstat (limited to 'src')
-rw-r--r--src/database.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/database.c b/src/database.c
index 57c9009..4101152 100644
--- a/src/database.c
+++ b/src/database.c
@@ -902,7 +902,7 @@ static int apk_db_read_state(struct apk_database *db, int flags)
{
struct apk_istream *is;
struct apk_bstream *bs;
- apk_blob_t blob;
+ apk_blob_t blob, world;
int r;
/* Read:
@@ -914,14 +914,14 @@ static int apk_db_read_state(struct apk_database *db, int flags)
* 6. script db
*/
if (!(flags & APK_OPENF_NO_WORLD)) {
- blob = apk_blob_from_file(db->root_fd, apk_world_file);
+ blob = world = apk_blob_from_file(db->root_fd, apk_world_file);
if (APK_BLOB_IS_NULL(blob))
return -ENOENT;
blob = apk_blob_trim(blob);
if (apk_blob_chr(blob, ' '))
db->compat_old_world = 1;
apk_blob_pull_deps(&blob, db, &db->world);
- free(blob.ptr);
+ free(world.ptr);
}
if (!(flags & APK_OPENF_NO_INSTALLED)) {