[glibmm/glibmm-2-52] Gio::TlsDatabase: Fix memory leak in a vfunc
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/glibmm-2-52] Gio::TlsDatabase: Fix memory leak in a vfunc
- Date: Tue, 27 Jun 2017 15:13:13 +0000 (UTC)
commit 9596b20a82b631323bc06e85bbf6d94509336fa4
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Jun 27 17:09:53 2017 +0200
Gio::TlsDatabase: Fix memory leak in a vfunc
create_certificate_handle_vfunc() shall delete the returned character array
after it has been copied to a Glib::ustring, or else it leaks memory.
Bug 783360
gio/src/tlsdatabase.hg | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/src/tlsdatabase.hg b/gio/src/tlsdatabase.hg
index 85fdba1..1cabc18 100644
--- a/gio/src/tlsdatabase.hg
+++ b/gio/src/tlsdatabase.hg
@@ -99,7 +99,9 @@ public:
_WRAP_VFUNC(TlsCertificateFlags verify_chain_finish(const Glib::RefPtr<AsyncResult>& result),
"verify_chain_finish", errthrow)
+dnl// create_certificate_handle_vfunc() shall return a newly allocated string.
#m4 _CONVERSION(`GTlsCertificate*',`const Glib::RefPtr<const TlsCertificate>&',`Glib::wrap($3, true)')
+#m4 _CONVERSION(`gchar*',`Glib::ustring',`Glib::convert_return_gchar_ptr_to_ustring($3)')
_WRAP_VFUNC(Glib::ustring create_certificate_handle(const Glib::RefPtr<const TlsCertificate>& certificate)
const, "create_certificate_handle")
#m4
_CONVERSION(`Glib::RefPtr<TlsCertificate>',`GTlsCertificate*',`G_TLS_CERTIFICATE(g_object_ref(Glib::unwrap($3)))')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]