On Tue, 29 Jan 2002 19:37:38 -0000, Martin Simmons wrote:

>Sorry for being obtuse.  Where the code says:
>
>    if ( strlen ( Text_Value(w) ) != 0 || passedSourceAsArg )
> {
> ...
> if (strlen(Text_Value(w)) == 0)
>  XtFree ( (char*) Text_Value(w) );
>        ...
>
> }
>
>it looked like the inner strlen test was supposed to match the outer one, i.e.
>it should be != 0, so it won't leak memory when NULL is stored there.
>Currently, it only ever frees the constant empty string in the resources[]
>array!
>
>However, I'm not sure if this should be freeing the string at all, because I
>think the pointer comes from the caller.
>
>__Martin

I think you're right.
Right now I'm committing some change to CVS, which is
not complete yet, but seems to get your example right...


---
Alexander Mai
[EMAIL PROTECTED]


_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif

Reply via email to