diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-07-03 14:51:01 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-07-03 14:51:01 +1000 |
commit | 55bbe6084a4aa77b0f39606234108d35b7c2af7a (patch) | |
tree | a5539be3bc51f9e9850197b0f014782de1d3ac81 | |
parent | 796e20daea750bf562f193eea1b00a5d192e2580 (diff) | |
download | mongo-55bbe6084a4aa77b0f39606234108d35b7c2af7a.tar.gz |
Check for errors when getting a cursor to avoid "maybe uninitialized" warning.
-rw-r--r-- | api/leveldb/rocks_wt.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/api/leveldb/rocks_wt.cc b/api/leveldb/rocks_wt.cc index 0a3d5b93a9a..2447425851a 100644 --- a/api/leveldb/rocks_wt.cc +++ b/api/leveldb/rocks_wt.cc @@ -293,6 +293,8 @@ DbImpl::Put(WriteOptions const &options, ColumnFamilyHandle *cfhp, Slice const & { WT_CURSOR *cursor; int ret = wtrocks_get_cursor(GetContext(), cfhp, &cursor); + if (ret != 0) + return WiredTigerErrorToStatus(ret); WT_ITEM item; item.data = key.data(); |