Another short lifetime string managed.

This commit is contained in:
2025-04-19 02:10:22 -04:00
parent efb891d82e
commit 688f2fddf2

View File

@ -410,7 +410,7 @@ static void File_info2html(ClientInfo *client, FileInfo *finfo, int n)
static void File_send_dir(ClientInfo *client)
{
int n;
char *d_cmd, *Hdirname, *Udirname, *HUdirname;
char *d_cmd, *Hdirname, *HUdirname;
DilloDir *Ddir = client->d_dir;
if (client->state == st_start) {
@ -425,8 +425,8 @@ static void File_send_dir(ClientInfo *client)
/* send HTTP header and HTML top part */
/* Send page title */
Udirname = dStrdup( Escape_uri_str(Ddir->dirname, NULL).c_str() );
HUdirname = Escape_html_str(Udirname);
auto Udirname = Escape_uri_str(Ddir->dirname, NULL);
HUdirname = Escape_html_str(Udirname.c_str());
Hdirname = Escape_html_str(Ddir->dirname);
a_Dpip_dsh_printf(client->sh, 0,
@ -440,7 +440,6 @@ static void File_send_dir(ClientInfo *client)
HUdirname, Hdirname, Hdirname);
dFree(Hdirname);
dFree(HUdirname);
dFree(Udirname);
if (client->old_style) {
a_Dpip_dsh_write_str(client->sh, 0, "<pre>\n");