From a213971d8a59d2b0533eed898df1d867bbd8a868 Mon Sep 17 00:00:00 2001 From: Nik Bougalis Date: Tue, 30 Sep 2014 17:32:37 -0700 Subject: [PATCH] Don't return (or dereference) dangling pointer --- db/flush_scheduler.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/flush_scheduler.cc b/db/flush_scheduler.cc index 636ff5a98..56816159e 100644 --- a/db/flush_scheduler.cc +++ b/db/flush_scheduler.cc @@ -28,6 +28,7 @@ ColumnFamilyData* FlushScheduler::GetNextColumnFamily() { if (cfd->IsDropped()) { if (cfd->Unref()) { delete cfd; + cfd = nullptr; } } else { break;