summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/html.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/html.cc b/src/html.cc
index b8473a7d..b45c7759 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3942,7 +3942,7 @@ static void Html_submit_form2(DilloHtml *html, DilloHtmlForm *form,
if ((form->method == DILLO_HTML_METHOD_GET) ||
(form->method == DILLO_HTML_METHOD_POST)) {
Dstr *DataStr = dStr_sized_new(4096);
- Dstr *boundary;
+ Dstr *boundary = dStr_sized_new(80);
int i;
bool success = true;
@@ -3975,7 +3975,6 @@ static void Html_submit_form2(DilloHtml *html, DilloHtmlForm *form,
}
/* generate a boundary that is not contained within the data */
- boundary = dStr_sized_new(80);
for (i = 0; i < max_tries && !success; i++) {
// Firefox-style boundary
dStr_sprintf(boundary, "---------------------------%d%d%d",
@@ -4023,9 +4022,6 @@ static void Html_submit_form2(DilloHtml *html, DilloHtmlForm *form,
}
}
- if (form->enc == DILLO_HTML_ENC_MULTIPART)
- dStr_free(boundary, 1);
-
/* form->action was previously resolved against base URL */
action_str = dStrdup(URL_STR(form->action));
@@ -4051,6 +4047,7 @@ static void Html_submit_form2(DilloHtml *html, DilloHtmlForm *form,
a_Nav_push(html->bw, new_url);
dFree(action_str);
+ dStr_free(boundary, 1);
dStr_free(DataStr, TRUE);
a_Url_free(new_url);
} else {