Removed another defer.

This commit is contained in:
Sascha L. Teichmann 2014-08-04 22:23:16 +02:00
parent 913ae0d2c7
commit eabcd53f6b

View File

@ -41,10 +41,11 @@ func (ldb *LevelDBBackend) Shutdown() error {
return nil return nil
} }
func (ldb *LevelDBBackend) Fetch(hash, key []byte) ([]byte, error) { func (ldb *LevelDBBackend) Fetch(hash, key []byte) (value []byte, err error) {
ro := leveldb.NewReadOptions() ro := leveldb.NewReadOptions()
defer ro.Close() value, err = ldb.db.Get(ro, key)
return ldb.db.Get(ro, key) ro.Close()
return
} }
func (ldb *LevelDBBackend) InTransaction() bool { func (ldb *LevelDBBackend) InTransaction() bool {