summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-24 17:01:05 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-24 17:01:05 +0100
commitb4c99f9e575b64ce55364446ef0ab840816370db (patch)
tree12b64fa8153aed9de6a119dc567533d3e975c31e
parent114dd37c6ec1a12d2fab752bae57a0d6e206e996 (diff)
downloadnetsurf-b4c99f9e575b64ce55364446ef0ab840816370db.tar.gz
netsurf-b4c99f9e575b64ce55364446ef0ab840816370db.tar.bz2
llcache: Free existing chain if we get a new one
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-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) {