summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/llcache.c5
1 files changed, 5 insertions, 0 deletions
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) {