Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 10 insertions, 1 deletions
-rw-r--r--badwolf.c11
diff --git a/badwolf.c b/badwolf.c
index 4c5a481..8578404 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -476,7 +476,16 @@ WebViewCb_load_failed_with_tls_errors(WebKitWebView *web_view,
}
#ifndef USE_LIBSOUP2
- g_free(failing_uri);
+ /* Calling g_free(failing_uri) ought to be the correct way but this causes a segfault.
+ *
+ * - documentation describes it as something which should be free
+ * - implementation seems to make it a pointer that should be freed
+ * - epiphany doesn't seems to free/unref it but gnome code seems to frequently have memleaks
+ *
+ * Decided to at least continue to try with using g_uri_unref(failing_uri) instead.
+ * Related fediverse post: <https://queer.hacktivis.me/objects/cec7c4e8-6a58-4358-85bf-b66f9bb21a98>
+ */
+ g_uri_unref(failing_uri);
#else
soup_uri_free(failing_uri);
#endif