]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - keydb_db2.c
cscvs to tla changeset 53
[onak.git] / keydb_db2.c
index a30b62c43ba3b27413263372315641073d491191..7490ff30b27ccad71edf7e9e9c002be7ffce528f 100644 (file)
@@ -78,7 +78,7 @@ void initdb(void)
         */
        db2_env.mp_size = 20 * 1024 * 1024;
 
-       ret = db_appinit(config.db2_dbpath, NULL,
+       ret = db_appinit(config.db_dir, NULL,
                        &db2_env, DB_INIT_MPOOL|DB_INIT_LOCK);
        if (!ret) {
                db2_keydbfiles = (DB **) malloc(sizeof (DB *) * db2_numdb);
@@ -183,6 +183,8 @@ int fetch_key(uint64_t keyid, struct openpgp_publickey **publickey,
                fetchbuf.size = data.size;
                read_openpgp_stream(buffer_fetchchar, &fetchbuf, &packets);
                parse_keys(packets, publickey);
+               free_packet_list(packets);
+               packets = NULL;
        }
 
        return (!ret);