From b4c99f9e575b64ce55364446ef0ab840816370db Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 24 May 2020 17:01:05 +0100 Subject: llcache: Free existing chain if we get a new one Signed-off-by: Daniel Silverstone --- content/llcache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'content') diff --git a/content/llcache.c b/content/llcache.c index 0d92a99cc..c1ddea54c 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -3078,6 +3078,11 @@ static void llcache_fetch_callback(const fetch_msg *msg, void *p) case FETCH_CERTS: /* Certificate information from the fetch */ + if (object->chain != NULL) { + cert_chain_free(object->chain); + object->chain = NULL; + } + /* Persist the chain onto our object */ error = cert_chain_dup(msg->data.chain, &object->chain); if (error != NSERROR_OK) { -- cgit v1.2.3