Permalink
Browse files

config.c: Move memory free earlier in cleanup code to ensure the loca…

…l pool is released.
  • Loading branch information...
1 parent eaa21ee commit 11655cdae26af4d885cf221e3cf726cd5194765d Sam Baskinger committed with Christopher Alfeld Feb 28, 2014
Showing with 2 additions and 3 deletions.
  1. +1 −2 engine/config.c
  2. +1 −1 tests/ibtest_strbase.hpp
View
@@ -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;
@@ -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;
}
@@ -567,7 +567,7 @@ class TestStringModification : public ::testing::Test
}
}
- ~TestStringModification() {
+ virtual ~TestStringModification() {
if (m_mpool != NULL) {
ib_mpool_destroy(m_mpool);
}

0 comments on commit 11655cd

Please sign in to comment.