Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PS-5842 - Memory leak after 'rocksdb.sys_vars.rocksdb_update_cf_optio…
…ns_basic' - in 'sys_var_pluginvar::global_update()' MyRocks uses update_cf_options option to trigger updates of cf options using functions like SetOptions. While setting the value of var_ptr we were copying the value of val leaking the old value of the pointer. update_cf_options variable is declared with PLUGIN_VAR_MEMALLOC flag, which will call my_free on previously used resources. The solution is to use a static cast of save pointer and let plugin_var_memalloc_global_update take care of freeing allocated resources.
- Loading branch information