Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
memory leak when updating @@rocksdb_update_cf_options
  • Loading branch information
vuvova committed Sep 28, 2018
1 parent 556f058 commit b154d30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/rocksdb/ha_rocksdb.cc
Expand Up @@ -5438,6 +5438,9 @@ static int rocksdb_done_func(void *const p) {
//rocksdb_tbl_options = nullptr;
rocksdb_stats = nullptr;

my_free(rocksdb_update_cf_options);
rocksdb_update_cf_options = nullptr;

my_error_unregister(HA_ERR_ROCKSDB_FIRST, HA_ERR_ROCKSDB_LAST);

/*
Expand Down Expand Up @@ -14002,6 +14005,8 @@ rocksdb_set_update_cf_options(THD *const /* unused */,

RDB_MUTEX_LOCK_CHECK(rdb_sysvars_mutex);

my_free(*reinterpret_cast<char **>(var_ptr));

if (!val) {
*reinterpret_cast<char **>(var_ptr) = nullptr;
RDB_MUTEX_UNLOCK_CHECK(rdb_sysvars_mutex);
Expand Down

0 comments on commit b154d30

Please sign in to comment.