Opened 4 years ago

Closed 4 years ago

#981 closed defect (fixed)

Possible memory leaks in SHP provider

Reported by: jng Owned by: jng
Priority: major Milestone:
Component: SHP Provider Version:
Severity: 3 Keywords:
Cc: External ID:

Description

From artem on mapguide-users:

About memory leaks in SHP provider, there was same problem with GetFilter(),

FDO\Providers\SHP\Src\Provider\ShpImpExtendedSelect.cpp

in function
ShpIScrollableFeatureReader* ShpImpExtendedSelect::ExecuteScrollable()

it is invoked there several times without FdoPtr<>.


========================
I also have found another one memory leak in SHP provider (probably better
to post it on FDO forum, but as continue of my words)...

It is caused by:
FDO\Providers\SHP\Src\Provider\ShpImpExtendedSelect.cpp
in function
ShpIScrollableFeatureReader* ShpImpExtendedSelect::ExecuteScrollable()
by next alloc:
propStubs[0].m_name = new wchar_t[wcslen(L"FeatId")+1];

It should be cleared in
ShpScrollableFeatureReader::~ShpScrollableFeatureReader()
but it is not, because in my case m_NumProps == 0 (0 - as input parameter to
ShpScrollableFeatureReader constructor "m_orderingProperties->GetCount()")

but I'm not sure how to fix that case correctly.

Attachments (2)

981.patch (6.0 KB ) - added by jng 4 years ago.
981_v2.patch (11.4 KB ) - added by jng 4 years ago.

Download all attachments as: .zip

Change History (3)

by jng, 4 years ago

Attachment: 981.patch added

by jng, 4 years ago

Attachment: 981_v2.patch added

comment:1 by jng, 4 years ago

Resolution: fixed
Status: assignedclosed

In 8013:

Plug an assortment of memory leaks in the SHP extended select and scrollable reader implementation. Fixes #981

Note: See TracTickets for help on using tickets.