adji

Adji's a Decisive and Joyful Internet browser
git clone https://noxz.tech/git/adji.git
Log | Files | Tags | LICENSE

commit: 8c4f30b133dc4e3103a87d3ebb203b32989c84a5
parent: 37a54a7d797b9291d4812e2b5a96adb7344dc5be
author: Chris Noxz <chris@noxz.tech>
date:   Fri, 29 Dec 2023 16:45:17 +0100
prevent segfault on WRDE errors other than NOSPACE
Mbrowser.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/browser.c b/browser.c
@@ -1313,7 +1313,7 @@ resolve_uri(const gchar *t)
 		    (e = g_uri_escape_string(t, NULL, FALSE))
 		);
 
-	if (r != -1) /* r != -1 indicates that wordexp() was executed */
+	if (r == 0 || r == WRDE_NOSPACE) /* free on success (r == 0) and NOSPACE */
 		wordfree(&x);
 	g_free(e);
 	g_free(l);