mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
Merge branch 'tls-certificate-refs' into 'main'
gtlscertificate: Hold a ref on the root certificate when building chains See merge request GNOME/glib!2761
This commit is contained in:
commit
55a5a82655
@ -626,7 +626,7 @@ create_certificate_chain_from_list (GSList *pem_list,
|
||||
|
||||
/* root will point to the last certificate in the file. */
|
||||
if (!root)
|
||||
root = cert;
|
||||
root = g_object_ref (cert);
|
||||
|
||||
pem = g_slist_next (pem);
|
||||
}
|
||||
@ -641,6 +641,8 @@ create_certificate_chain_from_list (GSList *pem_list,
|
||||
g_clear_object (&cert);
|
||||
}
|
||||
|
||||
g_clear_object (&root);
|
||||
|
||||
return cert;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user