diff options
-rw-r--r-- | dpi/cookies.c | 7 | ||||
-rw-r--r-- | src/html.cc | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/dpi/cookies.c b/dpi/cookies.c index fd91e0cc..d816f516 100644 --- a/dpi/cookies.c +++ b/dpi/cookies.c @@ -337,7 +337,6 @@ static void Cookies_init() filename = dStrconcat(dGethomedir(), "/.dillo/cookies", NULL); if ((old_cookies_file_stream = fopen(filename, "r")) != NULL) { - dFree(filename); MSG("WARNING: Reading old cookies file ~/.dillo/cookies too\n"); /* Get all lines in the file */ @@ -407,11 +406,9 @@ static void Cookies_init() Cookies_add_cookie(cookie); } } - fclose(old_cookies_file_stream); - } else { - dFree(filename); + fclose(old_cookies_file_stream); } - + dFree(filename); } /* diff --git a/src/html.cc b/src/html.cc index 6338315a..5cdf63f0 100644 --- a/src/html.cc +++ b/src/html.cc @@ -4082,7 +4082,7 @@ static void Html_submit_form2(DilloHtml *html, DilloHtmlForm *form, if (input->name) { dstr = dStr_new(input->name); dstr = Html_encode_text(encoder, dstr); - dStr_append(DataStr, dstr->str); + dStr_append_l(DataStr, dstr->str, dstr->len); dStr_free(dstr, 1); } for (i = 0; i < dList_length(values); i++) { @@ -4090,7 +4090,7 @@ static void Html_submit_form2(DilloHtml *html, DilloHtmlForm *form, dList_remove(values, dstr); if (input->type != DILLO_HTML_INPUT_FILE) dstr = Html_encode_text(encoder, dstr); - dStr_append(DataStr, dstr->str); + dStr_append_l(DataStr, dstr->str, dstr->len); dStr_free(dstr, 1); } } |