Skip to content

Commit

Permalink
Merge pull request tecbot#180 from tecbot/dont-destroy-cst
Browse files Browse the repository at this point in the history
Attempting to destroy the opts.cst will segfault
  • Loading branch information
jamesbibby authored Nov 22, 2019
2 parents a180c0b + 55ce39d commit eb0a0d0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -1202,9 +1202,8 @@ func (opts *Options) Destroy() {
if opts.ccmp != nil {
C.rocksdb_comparator_destroy(opts.ccmp)
}
if opts.cst != nil {
C.rocksdb_slicetransform_destroy(opts.cst)
}
// don't destroy the opts.cst here, it has already been
// associated with a PrefixExtractor and this will segfault
if opts.ccf != nil {
C.rocksdb_compactionfilter_destroy(opts.ccf)
}
Expand Down

0 comments on commit eb0a0d0

Please sign in to comment.