Commit Diff


commit - 10d47faf5c11c961d79e0f78da4219dd9f785a97
commit + de6bdba4416e9e727ac8933082ccb83b56fbd3ab
blob - ae3db86d7775a2c6249a088f66835c60c7ba0341
blob + c1dd72bbea71a243b6fa29c2cc5269e9283b5642
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -2353,6 +2353,10 @@ gw_blame_cb(void *arg, int nlines, int lineno, struct 
 		else
 			line_escape = strdup("");
 
+		if (a->gw_trans->repo_folder == NULL)
+			a->gw_trans->repo_folder = strdup("");
+		if (a->gw_trans->repo_folder == NULL)
+			goto err;
 		asprintf(&blame_row, blame_line, a->nlines_prec, a->lineno_cur,
 		    a->gw_trans->repo_name, bline->id_str,
 		    a->gw_trans->repo_file, a->gw_trans->repo_folder,
@@ -2363,6 +2367,7 @@ gw_blame_cb(void *arg, int nlines, int lineno, struct 
 			return err;
 
 		bline = &a->lines[a->lineno_cur - 1];
+err:
 		free(line_escape);
 		free(blame_row);
 	}