From 09fbf2e56d1c637208a5045f6d2070bea8fa5778 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 21 Dec 2023 17:01:56 -0500 Subject: [PATCH] lib: Keychain.c was using free This is a bit of a bummer that this slipped through for so long. Signed-off-by: Donald Sharp --- lib/keychain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/keychain.c b/lib/keychain.c index f4df71b7e921..5ff0d1e43e9d 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -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; } @@ -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); }