Fix null-pointer-dereference detected by Infer (https://github.com/facebook/infer)
Fix null-pointer-dereference detected by Infer (https://github.com/facebook/infer)

Test Plan: make check

Reviewers: leveldb, sdong

Reviewed By: sdong

Subscribers: leveldb, andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D57165

wenduo/rocksdb,wat-ze-hex/rocksdb,hobinyoon/rocksdb,hobinyoon/rocksdb,jalexanderqed/rocksdb,SunguckLee/RocksDB,hobinyoon/rocksdb,vmx/rocksdb,wenduo/rocksdb,SunguckLee/RocksDB,tsheasha/rocksdb,OverlordQ/rocksdb,hobinyoon/rocksdb,tsheasha/rocksdb,tsheasha/rocksdb,norton/rocksdb,tsheasha/rocksdb,OverlordQ/rocksdb,norton/rocksdb,tsheasha/rocksdb,wat-ze-hex/rocksdb,OverlordQ/rocksdb,norton/rocksdb,facebook/rocksdb,wat-ze-hex/rocksdb,Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB,wenduo/rocksdb,bbiao/rocksdb,wat-ze-hex/rocksdb,Andymic/rocksdb,bbiao/rocksdb,tsheasha/rocksdb,wat-ze-hex/rocksdb,ryneli/rocksdb,hobinyoon/rocksdb,wenduo/rocksdb,jalexanderqed/rocksdb,facebook/rocksdb,OverlordQ/rocksdb,vmx/rocksdb,SunguckLee/RocksDB,facebook/rocksdb,bbiao/rocksdb,jalexanderqed/rocksdb,norton/rocksdb,wenduo/rocksdb,jalexanderqed/rocksdb,facebook/rocksdb,norton/rocksdb,wat-ze-hex/rocksdb,hobinyoon/rocksdb,ryneli/rocksdb,norton/rocksdb,vmx/rocksdb,ryneli/rocksdb,Andymic/rocksdb,Andymic/rocksdb,facebook/rocksdb,tsheasha/rocksdb,norton/rocksdb,jalexanderqed/rocksdb,wat-ze-hex/rocksdb,vmx/rocksdb,ryneli/rocksdb,vmx/rocksdb,bbiao/rocksdb,wenduo/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,wat-ze-hex/rocksdb,Andymic/rocksdb,OverlordQ/rocksdb,jalexanderqed/rocksdb,vmx/rocksdb,ryneli/rocksdb,SunguckLee/RocksDB,ryneli/rocksdb,SunguckLee/RocksDB,ryneli/rocksdb,SunguckLee/RocksDB,tsheasha/rocksdb,facebook/rocksdb,bbiao/rocksdb,bbiao/rocksdb,vmx/rocksdb,facebook/rocksdb,wenduo/rocksdb,jalexanderqed/rocksdb,hobinyoon/rocksdb,OverlordQ/rocksdb,Andymic/rocksdb,OverlordQ/rocksdb,wenduo/rocksdb,vmx/rocksdb,facebook/rocksdb,hobinyoon/rocksdb,norton/rocksdb,bbiao/rocksdb,Andymic/rocksdb