changeset 1491:a10148c0bcab

cookies don't leak extra domain/path attrs
author corvid <corvid@lavabit.com>
date Sat, 02 Jan 2010 21:15:17 +0000
parents 10b1ae8fbb52
children b9a3ee3fbcb8
files dpi/cookies.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/cookies.c	Fri Jan 01 06:47:12 2010 +0000
+++ b/dpi/cookies.c	Sat Jan 02 21:15:17 2010 +0000
@@ -875,9 +875,11 @@
          cookie->value = Cookies_parse_value(&str, FALSE, TRUE);
       } else if (dStrcasecmp(attr, "Path") == 0) {
          value = Cookies_parse_value(&str, FALSE, FALSE);
+         dFree(cookie->path);
          cookie->path = value;
       } else if (dStrcasecmp(attr, "Domain") == 0) {
          value = Cookies_parse_value(&str, FALSE, FALSE);
+         dFree(cookie->domain);
          cookie->domain = value;
       } else if (dStrcasecmp(attr, "Discard") == 0) {
          discard = TRUE;