Skip to content

Commit

Permalink
don't do SG_FREE on varray.begin
Browse files Browse the repository at this point in the history
This is now handled in the destructor of v_array and additional free's
only cause double free bugs.
  • Loading branch information
Soeren Sonnenburg committed Apr 27, 2012
1 parent 0afeee4 commit 4574712
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
7 changes: 0 additions & 7 deletions src/shogun/classifier/vw/VwParser.cpp
Expand Up @@ -41,13 +41,6 @@ CVwParser::CVwParser(CVwEnvironment* env_to_use)

CVwParser::~CVwParser()
{
SG_FREE(channels.begin);
channels.begin = channels.end = channels.end_array = NULL;
SG_FREE(words.begin);
words.begin = words.end = words.end_array = NULL;
SG_FREE(name.begin);
name.begin = name.end = name.end_array = NULL;

SG_UNREF(env);
SG_UNREF(cache_writer);
}
Expand Down
12 changes: 0 additions & 12 deletions src/shogun/classifier/vw/vw_example.cpp
Expand Up @@ -29,18 +29,6 @@ VwExample::~VwExample()
{
if (ld)
delete ld;
if (tag.end_array != tag.begin)
{
SG_FREE(tag.begin);
tag.end_array = tag.begin;
}

for (vw_size_t j = 0; j < 256; j++)
{
if (atomics[j].begin != atomics[j].end_array)
SG_FREE(atomics[j].begin);
}
SG_FREE(indices.begin);
}

void VwExample::reset_members()
Expand Down
1 change: 0 additions & 1 deletion src/shogun/io/IOBuffer.cpp
Expand Up @@ -31,7 +31,6 @@ CIOBuffer::CIOBuffer(int fd)

CIOBuffer::~CIOBuffer()
{
free(space.begin);
}

void CIOBuffer::init()
Expand Down

0 comments on commit 4574712

Please sign in to comment.