mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
Fix two leaks seen when using TLS connections
g_tls_certificate_list_new_from_file() was leaking the file contents, and GSource was leaking the GSourcePrivate structure that got created when using child sources.
This commit is contained in:
parent
9fdc8d976a
commit
784619bc3a
@ -421,6 +421,7 @@ g_tls_certificate_list_new_from_file (const gchar *file,
|
||||
list = g_list_prepend (list, cert);
|
||||
}
|
||||
|
||||
g_free (contents);
|
||||
return g_list_reverse (list);
|
||||
}
|
||||
|
||||
|
@ -1700,6 +1700,13 @@ g_source_unref_internal (GSource *source,
|
||||
|
||||
g_slist_free (source->poll_fds);
|
||||
source->poll_fds = NULL;
|
||||
|
||||
if (source->priv)
|
||||
{
|
||||
g_slice_free (GSourcePrivate, source->priv);
|
||||
source->priv = NULL;
|
||||
}
|
||||
|
||||
g_free (source);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user