Skip to content

Commit

Permalink
lib: Keychain.c was using free
Browse files Browse the repository at this point in the history
This is a bit of a bummer that this slipped through
for so long.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Dec 21, 2023
1 parent bbda45a commit 09fbf2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/keychain.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static void keychain_free(struct keychain *keychain)
static struct key *key_new(void)
{
struct key *key = XCALLOC(MTYPE_KEY, sizeof(struct key));

QOBJ_REG(key, key);
return key;
}
Expand Down Expand Up @@ -77,7 +78,7 @@ static int key_cmp_func(void *arg1, void *arg2)
static void key_delete_func(struct key *key)
{
if (key->string)
free(key->string);
XFREE(MTYPE_KEY, key->string);
key_free(key);
}

Expand Down

0 comments on commit 09fbf2e

Please sign in to comment.