summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-07-03 14:51:01 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-07-03 14:51:01 +1000
commit55bbe6084a4aa77b0f39606234108d35b7c2af7a (patch)
treea5539be3bc51f9e9850197b0f014782de1d3ac81 /api
parent796e20daea750bf562f193eea1b00a5d192e2580 (diff)
downloadmongo-55bbe6084a4aa77b0f39606234108d35b7c2af7a.tar.gz
Check for errors when getting a cursor to avoid "maybe uninitialized" warning.
Diffstat (limited to 'api')
-rw-r--r--api/leveldb/rocks_wt.cc2
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();