mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
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 <sharpd@nvidia.com>
This commit is contained in:
parent
bbda45a825
commit
09fbf2e56d
@ -37,6 +37,7 @@ static void keychain_free(struct keychain *keychain)
|
|||||||
static struct key *key_new(void)
|
static struct key *key_new(void)
|
||||||
{
|
{
|
||||||
struct key *key = XCALLOC(MTYPE_KEY, sizeof(struct key));
|
struct key *key = XCALLOC(MTYPE_KEY, sizeof(struct key));
|
||||||
|
|
||||||
QOBJ_REG(key, key);
|
QOBJ_REG(key, key);
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
@ -77,7 +78,7 @@ static int key_cmp_func(void *arg1, void *arg2)
|
|||||||
static void key_delete_func(struct key *key)
|
static void key_delete_func(struct key *key)
|
||||||
{
|
{
|
||||||
if (key->string)
|
if (key->string)
|
||||||
free(key->string);
|
XFREE(MTYPE_KEY, key->string);
|
||||||
key_free(key);
|
key_free(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user