I think the following code can lead to memory leak because doTypeDescFromTypeInfo might call scheme_signal_error

static
MX_TYPEDESC *typeDescFromTypeInfo(LPCTSTR name, INVOKEKIND invKind,
                                  ITypeInfo *pITypeInfo)
{
  BSTR unicodeName;
  MX_TYPEDESC *retval;

  unicodeName = textToBSTR(name, strlen(name));
  retval = doTypeDescFromTypeInfo(unicodeName, invKind, pITypeInfo);

  SysFreeString(unicodeName);

  return retval;
}

There should be some construct similar to try...catch...finally using the scheme_* primitives surrounding the call to doTypeDescFromTypeInfo and SysFreeString.

Regards,
José Lopes

--
José António Branquinho de Oliveira Lopes
58612 - MEIC-A
[email protected]

_________________________________________________
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/users

Reply via email to