Igor Sugak 73711f956c rocksdb: Fix scan-build bug 'Memory leak' in db/db_bench.cc
Summary:
The bug is detected by scan-build.

In `void WriteSeqSeekSeq(ThreadState* thread)` memory is allocated in line 3118 `Slice key = AllocateKey();` but `Slice` is not responsible deleting `Slice::data()`.

Added `std::unique_ptr<const char[]>*` parameter to ` AllocateKey()`, so that it requires caller to not forget about Slice::data() management.

scan-build bug report: http://home.fburl.com/~sugak/latest6/report-6e9754.html#EndPath

Test Plan:
Make sure scan-build does not report 'Memory leak' in db/db_bench.cc and all tests are passing.
```lang=bash
% make analyze
% make check
```

Reviewers: lgalanis, igor, meyering, sdong

Reviewed By: meyering, sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D33501
2015-02-19 14:27:48 -08:00
..
2014-10-31 11:59:54 -07:00
2014-09-04 16:18:36 -07:00
2015-02-09 09:53:30 -08:00
2015-02-04 16:04:51 -08:00
2015-02-04 16:04:51 -08:00
2015-01-26 11:48:07 -08:00
2014-01-27 14:49:10 -08:00
2015-02-18 11:49:31 -08:00
2015-02-18 11:49:31 -08:00
2015-01-13 12:27:28 -08:00
2014-11-06 11:14:28 -08:00
2015-01-29 18:22:43 -08:00
2014-11-06 11:14:28 -08:00
2014-11-06 11:14:28 -08:00
2015-02-04 16:04:51 -08:00
2015-02-06 08:44:30 -08:00
2014-10-31 11:59:54 -07:00
2015-02-06 08:44:30 -08:00
2015-01-23 17:35:12 -08:00
2014-11-10 17:39:38 -05:00
2014-09-13 14:14:10 -07:00
2014-09-12 16:23:58 -07:00