Fix delete in db_ttl.cc

Summary: should delete the proper variable

Test Plan: make all check

Reviewers: haobo, dhruba

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D12921
main
Mayank Agarwal 11 years ago
parent eeb90c7ee9
commit e2a093a6c3
  1. 2
      utilities/ttl/db_ttl.cc

@ -56,7 +56,7 @@ Status UtilityDB::OpenTtlDB(
Status st; Status st;
*dbptr = new DBWithTTL(ttl, options, dbname, st, read_only); *dbptr = new DBWithTTL(ttl, options, dbname, st, read_only);
if (!st.ok()) { if (!st.ok()) {
delete dbptr; delete *dbptr;
} }
return st; return st;
} }

Loading…
Cancel
Save