Skip to content

Commit

Permalink
config.c: Move memory free earlier in cleanup code to ensure the loca…
Browse files Browse the repository at this point in the history
…l pool is released.
  • Loading branch information
Sam Baskinger authored and Christopher Alfeld committed Mar 4, 2014
1 parent eaa21ee commit 11655cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions engine/config.c
Expand Up @@ -329,6 +329,7 @@ ib_status_t ib_cfgparser_parse_private(

close(fd);
cleanup_fd:
ib_mpool_lite_destroy(local_mp);

cp->cur_cwd = save_cwd;

Expand All @@ -344,8 +345,6 @@ ib_status_t ib_cfgparser_parse_private(
error_count,
ib_status_to_string(rc));

ib_mpool_lite_destroy(local_mp);

return rc;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ibtest_strbase.hpp
Expand Up @@ -567,7 +567,7 @@ class TestStringModification : public ::testing::Test
}
}

~TestStringModification() {
virtual ~TestStringModification() {
if (m_mpool != NULL) {
ib_mpool_destroy(m_mpool);
}
Expand Down

0 comments on commit 11655cd

Please sign in to comment.