[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev [dev16] minor cookie crumbs
From: |
brian j pardy |
Subject: |
Re: lynx-dev [dev16] minor cookie crumbs |
Date: |
Thu, 11 Feb 1999 09:46:20 -0800 (PST) |
On Thu, 11 Feb 1999, I wrote:
> On Thu, 11 Feb 1999, Kim DeVaughn wrote:
>
> > When I compile/run dev.16 with --enable-find-leaks configured, I am
> > getting the following memory leak report on exiting lynx:
> >
> > > Memory leak detected.
> > > Pointer: 0x161170
> > > Contains:: |
> > > ByteSize: 1
> > > FileName: ./LYrcFile.c
> > > LineCount: 450
[...]
> > > Total memory leakage this run: 3
> >
> > which appears to be related to the StrAllocCopy() calls in LYrcFile.c:
> >
> > /*
> > * Cookie domains to perform loose checks?
> > */
> > } else if (FIND_KEYWORD(cp, "cookie_loose_invalid_domains")) {
> > cp = SkipEquals(cp);
> > StrAllocCopy(LYCookieLooseCheckDomains, cp);
> > cookie_set_invcheck(LYCookieLooseCheckDomains, INVCHECK_LOOSE);
> > [...]
> >
> > This happens even when just starting up lynx on my default page (which
> > has NO cookie code of any kind in it).
>
> Oops, that's my fault.
>
> I think these all need to be wrapped with:
>
> } else if (FIND_KEYWORD(cp, "cookie_loose_invalid_domains")) {
> if(cp != NULL) {
> cp = SkipEquals(cp);
> StrAllocCopy(LYCookieLooseCheckDomains, cp);
> cookie_set_invcheck(LYCookieLooseCheckDomains, INVCHECK_LOOSE);
> }
Nope, after recompiling, that's not what is needed. I just never added
these new variables to the list that gets FREE()'d.
This patch should handle:
diff -cr 2.8.2dev.16/src/LYMain.c 2.8.2dev.16.bri/src/LYMain.c
*** 2.8.2dev.16/src/LYMain.c Thu Feb 11 09:14:38 1999
--- 2.8.2dev.16.bri/src/LYMain.c Thu Feb 11 09:05:35 1999
***************
*** 466,471 ****
--- 466,476 ----
#ifdef EXP_PERSISTENT_COOKIES
FREE(LYCookieFile);
#endif
+ FREE(LYCookieAcceptDomains);
+ FREE(LYCookieRejectDomains);
+ FREE(LYCookieLooseCheckDomains);
+ FREE(LYCookieStrictCheckDomains);
+ FREE(LYCookieQueryCheckDomains);
FREE(LYUserAgent);
FREE(LYUserAgentDefault);
FREE(LYHostName);
--
<http://www.psnw.com/~posterkid/keys/> for DSA/ElG-E/RSA keys
DSA 0x0A641AA5:0B1E 37B7 ECCB FC96 B6C6 7242 0A59 F8D5 EFA9 4F81
RSA 0x4E65C321: 42 57 B3 D2 39 8E 74 C3 5E 4D AC 43 25 D2 26 D4