Commit Diff


commit - 6347dcd0e32a0955b60ef47d1fa26e5b0f94c1a1
commit + 71105afa57371ba4b77b17a541435aaea471b7ec
blob - 554df3f47a1a4793f5dae563d298cc5a5829c2c8
blob + 533981d57a793ab90f814bcb71de4694c85bd243
--- ui.c
+++ ui.c
@@ -1485,8 +1485,10 @@ new_tab(const char *url)
 {
 	struct tab	*tab;
 
-	if ((tab = calloc(1, sizeof(*tab))) == NULL)
-		goto err;
+	if ((tab = calloc(1, sizeof(*tab))) == NULL) {
+		event_loopbreak();
+		return NULL;
+	}
 
 	TAILQ_INIT(&tab->hist.head);
 
@@ -1502,10 +1504,6 @@ new_tab(const char *url)
 
 	load_url_in_tab(tab, url);
 	return tab;
-
-err:
-	event_loopbreak();
-	return NULL;
 }
 
 int