diff options
Use g_uri_unref instead of g_free on g_uri_parse
1 files changed, 10 insertions, 1 deletions
| -rw-r--r-- | badwolf.c | 11 |
@@ -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 |