From 23d178d472e2066e35db8efdecba87e1e9d2b342cf529005af0a2a181e458125 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sat, 19 Apr 2025 02:27:43 -0400 Subject: [PATCH] Another local simple string. --- dpi/file.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dpi/file.cc b/dpi/file.cc index 0837dae..70ae7fe 100644 --- a/dpi/file.cc +++ b/dpi/file.cc @@ -339,7 +339,7 @@ static void File_info2html(ClientInfo *client, FileInfo *finfo, int n) int size; const char *sizeunits; char namebuf[MAXNAMESIZE + 1]; - char *Uref, *HUref, *Hname; + char *HUref, *Hname; const char *ref, *filecont, *name = finfo->filename; if (finfo->size <= 9999) { @@ -373,8 +373,8 @@ static void File_info2html(ClientInfo *client, FileInfo *finfo, int n) } /* escape problematic filenames */ - Uref = dStrdup( Escape_uri_str(ref, NULL).c_str() ); - HUref = Escape_html_str(Uref); + const std::string Uref = Escape_uri_str(ref, NULL); + HUref = Escape_html_str(Uref.c_str()); Hname = Escape_html_str(name); if (client->old_style) { @@ -401,7 +401,6 @@ static void File_info2html(ClientInfo *client, FileInfo *finfo, int n) dFree(Hname); dFree(HUref); - dFree(Uref); } /*