Hi,

In Com_init a critical section 'OpenCS' is initialised early on, if one
of the CreateEvents that follow fail then the control structure,
pserialhead
points to is freed with LocalFree(pserialhead). However the criticalsection
is not deleted. This is only done when Com_deinit is called which happens
later on in Com_init when certain things fail. What am i missing?

Re: Critical section in Com_init in mdd.c by ms

ms
Fri Sep 30 05:06:11 CDT 2005

Just to make clearer, i was wondering why there was no
DeleteCriticalSection(OpenCs) type statement together
with LocalFree(pSerialhead).

"ms" <ms@discussions.microsoft.com> wrote in message
news:%23vylGGRxFHA.2652@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> In Com_init a critical section 'OpenCS' is initialised early on, if one
> of the CreateEvents that follow fail then the control structure,
> pserialhead
> points to is freed with LocalFree(pserialhead). However the
criticalsection
> is not deleted. This is only done when Com_deinit is called which
happens
> later on in Com_init when certain things fail. What am i missing?
>
>