[Commits] 3b234104ae2: MDEV-16955: rocksdb_sys_vars.rocksdb_update_cf_options_basic

revision-id: 3b234104ae227556f06c2c3d227e5fc51692c8fa (mariadb-10.2.26-13-g3b234104ae2) parent(s): 6765cc607764c920bc5fbf4128bb526b73f15c2e author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2019-08-10 01:46:50 +0300 message: MDEV-16955: rocksdb_sys_vars.rocksdb_update_cf_options_basic ... produces "bytes lost" warnings When rocksdb_validate_update_cf_options() returns an error, the update won't happen. Free the copy of the string in this case. --- storage/rocksdb/ha_rocksdb.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index 4f256b10abc..613ac0884a7 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -14314,6 +14314,8 @@ static int rocksdb_validate_update_cf_options( // then there's no point to proceed. if (!Rdb_cf_options::parse_cf_options(str, &option_map)) { my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), "rocksdb_update_cf_options", str); + // Free what we've copied with my_strdup above. + my_free((void*)(*(const char **)save)); return HA_EXIT_FAILURE; } // Loop through option_map and create missing column families
participants (1)
-
Sergei Petrunia