]> the.earth.li Git - onak.git/blobdiff - keydb_fs.c
Fix up memory leaks in fs keydb backend deletion
[onak.git] / keydb_fs.c
index 01874ee4188da6e1d483a8fffb7bc7115e47ba70..aabb616e7efcd9e3dd82ab567708e8b31e7fb5a8 100644 (file)
@@ -435,6 +435,8 @@ static int fs_delete_key(struct onak_dbctx *dbctx,
 
                        wl = wl->next;
                }
+               llfree(wordlist, free);
+               wordlist = NULL;
 
                subkeyids = keysubkeys(pk);
                i = 0;
@@ -463,6 +465,8 @@ static int fs_delete_key(struct onak_dbctx *dbctx,
        keypath(buffer, sizeof(buffer), keyid, dbctx->config->location);
        unlink(buffer);
 
+       free_publickey(pk);
+
        if (!intrans)
                fs_endtrans(dbctx);
        return 1;