>>>>> On Tue, 29 Jan 2002 19:44:53 +0100, Danny Backx <[EMAIL PROTECTED]>
said:

  Danny> Which test in Initialize() is wrong, and what should it be ?
  Danny> (Save us the search if you already have an answer for that one.)

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

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

Reply via email to