[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev [patch] more SH_EX tweak
From: |
T.E.Dickey |
Subject: |
Re: lynx-dev [patch] more SH_EX tweak |
Date: |
Sun, 17 Oct 1999 11:08:04 -0400 (EDT) |
> As for present dev.12, some modification is done.
> /* !!! */ A movement was unstable under the condition
> that a part wasn't changed.
>
> Teach me the reason why this part was removed.
>
> ---
> diff -Bur lynx283.d12/WWW/Library/Implementation/HTString.c
> lynx283.w32/WWW/Library/Implementation/HTString.c
> --- lynx283.d12/WWW/Library/Implementation/HTString.c Fri Oct 15 23:05:52
> 1999
> +++ lynx283.w32/WWW/Library/Implementation/HTString.c Fri Oct 15 23:10:50
> 1999
> @@ -763,6 +763,8 @@
> char ** pstr = va_arg(ap, char **);
> CONST char * fmt = va_arg(ap, CONST char *);
> #endif
> + if (pstr != 0) /* !!! */
> + *pstr = 0;
this was a memory leak - I didn't notice it at the time, but my intent in
both HTSprint0 and HTSprintf was to avoid unnecessary reallocation of the
destination buffer (reusing a previous allocation if they're chained
together). If there's a problem here, then it's something that we should
investigate (figure out a better fix). Zeroing the pointer makes the code
leak memory from any previous call to it.
> --Hiroyuki
--
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey