summaryrefslogtreecommitdiff
path: root/src/gmutil.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-29 15:06:09 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-29 15:06:09 +0300
commite02664c61d27feae1d6dcdda4a3af54e873ee9bd (patch)
treef9aa93aadd910fc71fe2ac0b113bb05104ca4f35 /src/gmutil.c
parentd98604ca3bd3f3986a42c4e9e1c4228089e39024 (diff)
Fixed a memory leak in URL handling
Diffstat (limited to 'src/gmutil.c')
-rw-r--r--src/gmutil.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gmutil.c b/src/gmutil.c
index 22219221..ee8f150a 100644
--- a/src/gmutil.c
+++ b/src/gmutil.c
@@ -658,7 +658,11 @@ const iString *canonicalUrl_String(const iString *d) {
658 /* This is done separately to avoid the copy if %3A is not present; it's rare. */ 658 /* This is done separately to avoid the copy if %3A is not present; it's rare. */
659 canon = copy_String(d); 659 canon = copy_String(d);
660 urlDecodePath_String(canon); 660 urlDecodePath_String(canon);
661 urlDecodeExclude_String(d, "%/?:;#&= "); /* decode everything else in all parts */ 661 iString *dec = maybeUrlDecodeExclude_String(canon, "%/?:;#&= "); /* decode everything else in all parts */
662 if (dec) {
663 set_String(canon, dec);
664 delete_String(dec);
665 }
662 } 666 }
663 else { 667 else {
664 canon = maybeUrlDecodeExclude_String(d, "%/?:;#&= "); 668 canon = maybeUrlDecodeExclude_String(d, "%/?:;#&= ");